From a81c83d3e73a8c368a22ff41ff376b77185fe100 Mon Sep 17 00:00:00 2001 From: Noah Gilson Date: Wed, 22 Jun 2022 16:40:14 -0700 Subject: [PATCH] Remove release from test now that its opt in Code cleanup Fix whitespace issues Fix whitespace again [SQUASHED] Code Cleanup Changes --- .../targets/Microsoft.NET.Publish.targets | 75 ++++++++++--------- .../targets/Microsoft.NET.Sdk.props | 2 +- .../GivenThatWeWantToPublishAnAotApp.cs | 1 - .../GivenDotnetPublishInvocation.cs | 1 + .../Targets/Microsoft.NET.Sdk.Publish.props | 1 + 5 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets index 372e172f23ca..0dd170e119a8 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets @@ -71,6 +71,7 @@ Copyright (c) .NET Foundation. All rights reserved. build step's minimal output. Otherwise there is no indication at minimal verbosity of where the published assets were copied. --> + @@ -476,37 +477,37 @@ Copyright (c) .NET Foundation. All rights reserved. ResolveRuntimePackAssets; _ComputePackageReferencePublish"> - - - - - - - - <_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)" - Condition="('$(SelfContained)' == 'true' Or '%(RuntimePackAsset.RuntimePackAlwaysCopyLocal)' == 'true') and '%(RuntimePackAsset.AssetType)' != 'pgodata'" /> - - - - - <_ResolvedCopyLocalPublishAssets Remove="@(_NativeRestoredAppHostNETCore)" /> - - - - <_ResolvedCopyLocalPublishAssets Include="@(_ResolvedCopyLocalBuildAssets)" - Condition="'%(_ResolvedCopyLocalBuildAssets.CopyToPublishDirectory)' != 'false' "/> - + + + + + + + <_ResolvedCopyLocalPublishAssets Include="@(RuntimePackAsset)" + Condition="('$(SelfContained)' == 'true' Or '%(RuntimePackAsset.RuntimePackAlwaysCopyLocal)' == 'true') and '%(RuntimePackAsset.AssetType)' != 'pgodata'" /> + + + + + <_ResolvedCopyLocalPublishAssets Remove="@(_NativeRestoredAppHostNETCore)" /> + + + + <_ResolvedCopyLocalPublishAssets Include="@(_ResolvedCopyLocalBuildAssets)" + Condition="'%(_ResolvedCopyLocalBuildAssets.CopyToPublishDirectory)' != 'false' "/> + @@ -518,13 +519,13 @@ Copyright (c) .NET Foundation. All rights reserved. ============================================================ --> - + - - - + + + @@ -875,7 +876,7 @@ Copyright (c) .NET Foundation. All rights reserved. $(PublishedSingleFileName) - + true - + Debug;Release diff --git a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs index 83c1a12505b2..33b2b0a4b67e 100644 --- a/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs +++ b/src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAnAotApp.cs @@ -214,7 +214,6 @@ public void NativeAotStaticLib_only_runs_when_switch_is_enabled(string targetFra testProject.AdditionalProperties["RuntimeIdentifier"] = rid; testProject.AdditionalProperties["NativeLib"] = "Static"; testProject.AdditionalProperties["SelfContained"] = "true"; - testProject.AdditionalProperties["Configuration"] = "Release"; var testAsset = _testAssetsManager.CreateTestProject(testProject); var publishCommand = new PublishCommand(Log, Path.Combine(testAsset.TestRoot, testProject.Name)); diff --git a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs index c63e577bcbd8..81f67d02f2fb 100644 --- a/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs +++ b/src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetPublishInvocation.cs @@ -39,6 +39,7 @@ public GivenDotnetPublishInvocation(ITestOutputHelper output) [InlineData(new string[] { "--verbosity", "minimal" }, "-verbosity:minimal")] [InlineData(new string[] { "" }, "")] [InlineData(new string[] { "", "" }, " ")] + [InlineData(new string[] { "--disable-build-servers" }, "-p:UseRazorBuildServer=false -p:UseSharedCompilation=false /nodeReuse:false")] public void MsbuildInvocationIsCorrect(string[] args, string expectedAdditionalArgs) { CommandDirectoryContext.PerformActionWithBasePath(WorkingDirectory, () => diff --git a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props index d256bd1270de..f62a57dc0c0d 100644 --- a/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props +++ b/src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.props @@ -10,4 +10,5 @@ Copyright (c) .NET Foundation. All rights reserved. *********************************************************************************************** --> +