Skip to content

Commit 7a823c4

Browse files
committed
Do not use nologo as tl does not display logo
1 parent 913afc2 commit 7a823c4

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/Cli/dotnet/commands/RestoringCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ private static bool HasArgumentToExcludeFromRestore(IEnumerable<string> argument
118118
private static (string[] newArgumentsToAdd, string[] existingArgumentsToForward) ProcessForwardedArgumentsForSeparateRestore(IEnumerable<string> forwardedArguments)
119119
{
120120
// Separate restore should be silent in terminal logger - regardless of actual scenario
121-
HashSet<string> newArgumentsToAdd = new() { "-nologo", "-tlp:verbosity=quiet" };
121+
HashSet<string> newArgumentsToAdd = new() { "-tlp:verbosity=quiet" };
122122
List<string> existingArgumentsToForward = new();
123123

124124
foreach (var argument in forwardedArguments)
@@ -130,6 +130,7 @@ private static (string[] newArgumentsToAdd, string[] existingArgumentsToForward)
130130

131131
if (TriggersSilentSeparateRestore(argument))
132132
{
133+
newArgumentsToAdd.Add("-nologo");
133134
newArgumentsToAdd.Add("-verbosity:quiet");
134135
}
135136
}

test/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalA
5656
}
5757

5858
[Theory]
59-
[InlineData(new string[] { "-f", "tfm" }, "-target:Restore -nologo -tlp:verbosity=quiet", "-property:TargetFramework=tfm")]
60-
[InlineData(new string[] { "-p:TargetFramework=tfm" }, "-target:Restore -nologo -tlp:verbosity=quiet", "--property:TargetFramework=tfm")]
61-
[InlineData(new string[] { "/p:TargetFramework=tfm" }, "-target:Restore -nologo -tlp:verbosity=quiet", "--property:TargetFramework=tfm")]
62-
[InlineData(new string[] { "-t:Run", "-f", "tfm" }, "-target:Restore -nologo -tlp:verbosity=quiet", "-property:TargetFramework=tfm -t:Run")]
63-
[InlineData(new string[] { "/t:Run", "-f", "tfm" }, "-target:Restore -nologo -tlp:verbosity=quiet", "-property:TargetFramework=tfm /t:Run")]
59+
[InlineData(new string[] { "-f", "tfm" }, "-target:Restore -tlp:verbosity=quiet", "-property:TargetFramework=tfm")]
60+
[InlineData(new string[] { "-p:TargetFramework=tfm" }, "-target:Restore -tlp:verbosity=quiet", "--property:TargetFramework=tfm")]
61+
[InlineData(new string[] { "/p:TargetFramework=tfm" }, "-target:Restore -tlp:verbosity=quiet", "--property:TargetFramework=tfm")]
62+
[InlineData(new string[] { "-t:Run", "-f", "tfm" }, "-target:Restore -tlp:verbosity=quiet", "-property:TargetFramework=tfm -t:Run")]
63+
[InlineData(new string[] { "/t:Run", "-f", "tfm" }, "-target:Restore -tlp:verbosity=quiet", "-property:TargetFramework=tfm /t:Run")]
6464
[InlineData(new string[] { "-o", "myoutput", "-f", "tfm", "-v", "diag", "/ArbitrarySwitchForMSBuild" },
65-
"-target:Restore -nologo -tlp:verbosity=quiet -verbosity:diag -property:OutputPath=<cwd>myoutput -property:_CommandLineDefinedOutputPath=true /ArbitrarySwitchForMSBuild",
65+
"-target:Restore -tlp:verbosity=quiet -verbosity:diag -property:OutputPath=<cwd>myoutput -property:_CommandLineDefinedOutputPath=true /ArbitrarySwitchForMSBuild",
6666
"-property:TargetFramework=tfm -verbosity:diag -property:OutputPath=<cwd>myoutput -property:_CommandLineDefinedOutputPath=true /ArbitrarySwitchForMSBuild")]
67-
[InlineData(new string[] { "-f", "tfm", "-getItem:Compile", "-getProperty:TargetFramework", "-getTargetResult:Build" }, "-target:Restore -nologo -tlp:verbosity=quiet -verbosity:quiet", "-property:TargetFramework=tfm -getItem:Compile -getProperty:TargetFramework -getTargetResult:Build")]
67+
[InlineData(new string[] { "-f", "tfm", "-getItem:Compile", "-getProperty:TargetFramework", "-getTargetResult:Build" }, "-target:Restore -tlp:verbosity=quiet -nologo -verbosity:quiet", "-property:TargetFramework=tfm -getItem:Compile -getProperty:TargetFramework -getTargetResult:Build")]
6868
public void MsbuildInvocationIsCorrectForSeparateRestore(
6969
string[] args,
7070
string expectedAdditionalArgsForRestore,

test/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void MsbuildInvocationIsCorrectForSeparateRestore(string[] args, string e
7373
command.SeparateRestoreCommand
7474
.GetArgumentsToMSBuild()
7575
.Should()
76-
.Be($"{ExpectedPrefix} -target:Restore -nologo -tlp:verbosity=quiet {ExpectedProperties}");
76+
.Be($"{ExpectedPrefix} -target:Restore -tlp:verbosity=quiet {ExpectedProperties}");
7777

7878
command.GetArgumentsToMSBuild()
7979
.Should()

0 commit comments

Comments
 (0)