Fix dotnet build /clp:NoSummary

This commit is contained in:
Nick Guerrera 2017-10-25 10:42:08 -07:00
parent 20b0b820a8
commit 8fead788d7
2 changed files with 4 additions and 5 deletions

View file

@ -37,6 +37,8 @@ namespace Microsoft.DotNet.Tools.Build
var appliedBuildOptions = result["dotnet"]["build"];
msbuildArgs.Add($"/clp:Summary");
if (appliedBuildOptions.HasOption("--no-incremental"))
{
msbuildArgs.Add("/t:Rebuild");
@ -50,8 +52,6 @@ namespace Microsoft.DotNet.Tools.Build
msbuildArgs.AddRange(appliedBuildOptions.Arguments);
msbuildArgs.Add($"/clp:Summary");
bool noRestore = appliedBuildOptions.HasOption("--no-restore");
return new BuildCommand(

View file

@ -9,8 +9,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
{
public class GivenDotnetBuildInvocation
{
const string ExpectedPrefix = "exec <msbuildpath> /m /v:m";
const string ExpectedSuffix = "/clp:Summary";
const string ExpectedPrefix = "exec <msbuildpath> /m /v:m /clp:Summary";
[Theory]
[InlineData(new string[] { }, "/t:Build")]
@ -36,7 +35,7 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
var msbuildPath = "<msbuildpath>";
BuildCommand.FromArgs(args, msbuildPath)
.GetProcessStartInfo().Arguments.Should().Be($"{ExpectedPrefix}{expectedAdditionalArgs} {ExpectedSuffix}");
.GetProcessStartInfo().Arguments.Should().Be($"{ExpectedPrefix}{expectedAdditionalArgs}");
}
}
}