Implemented `Target` parameter in DotNetBuild task

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 10 years ago
parent 7688c59a22
commit 5b7470e3dd
  1. 3
      BuildServer/lib/tasks/dotnetbuild.js
  2. 11
      DotNetBuilder/CompileRequest.cs
  3. 6
      DotNetBuilder/Compiler.cs

@ -12,7 +12,8 @@ module.exports = function (params, processor) {
type: "dotnetbuilderwrapper",
params: {
command: "compile",
SolutionPath: processor.context.exported + "/" + params.solution
SolutionPath: processor.context.exported + "/" + params.solution,
Target: "Build"
}
}
]

@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MicroBuildServer.DotNetBuilder
namespace MicroBuildServer.DotNetBuilder
{
class CompileRequest
{
public string SolutionPath { get; set; }
public string OutputPath { get; set; }
public string Target { get; set; }
public string OutputDirectory { get; set; }
}
}

@ -75,12 +75,12 @@ namespace MicroBuildServer.DotNetBuilder
var globalProperty = new Dictionary<string, string>();
globalProperty.Add("Configuration", "Release");
globalProperty.Add("Platform", "Any CPU");
if (!string.IsNullOrEmpty(request.OutputPath))
if (!string.IsNullOrEmpty(request.OutputDirectory))
{
globalProperty.Add("OutputPath", request.OutputPath);
globalProperty.Add("OutputDirectory", request.OutputDirectory);
}
var buildRequest = new BuildRequestData(request.SolutionPath, globalProperty, null, new string[] { "Build" }, null);
var buildRequest = new BuildRequestData(request.SolutionPath, globalProperty, null, new [] { request.Target }, null);
var parameters = new BuildParameters(pc);
parameters.Loggers = new ILogger[] { logger };

Loading…
Cancel
Save