From fdb0372a673336fb7af6f921b2d1e73ec2be8137 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Tue, 5 May 2020 21:59:15 -0700 Subject: [PATCH] Upgrade to more recent .NET SDK (#21017) * Update SDK to preview.5.20251.2 - includes support for the `net5.0` TFM - includes fix for `$(PublishDepsFilePath)` - includes fix for incorrect NU5118 warnings when `'$(PackAsTool)' == 'true'` * !!temporary!! Suppress NU5129 warnings - build/ and buildTransitive/ naming conventions do not treat TFMs as equivalent * Run `InjectRequestHandlerOnPublish` later - late enough for .deps file to exist i.e. after the `CopyFilesToPublishDirectory` target - `AfterTargets` is a bit flaky; use `BeforeTargets` with empty targets instead * Always add `@(AssemblyAttribute)` items before they are processed - use `BeforeTargets="GetAssemblyAttributes"` for consistently throughout the repo --- global.json | 4 ++-- ...NetCore.Mvc.Razor.RuntimeCompilation.csproj | 5 ++++- .../Microsoft.AspNetCore.Mvc.Testing.csproj | 6 ++++-- .../Microsoft.AspNetCore.Mvc.Testing.targets | 6 +++--- .../BlazorTemplates.Tests.csproj | 2 +- .../test/ProjectTemplates.Tests.csproj | 2 +- src/Servers/IIS/build/testsite.props | 18 ++++++++++++++---- src/Shared/E2ETesting/E2ETesting.targets | 6 +++--- 8 files changed, 32 insertions(+), 17 deletions(-) diff --git a/global.json b/global.json index 7dc4e1b46f..dee19df73d 100644 --- a/global.json +++ b/global.json @@ -1,9 +1,9 @@ { "sdk": { - "version": "5.0.100-preview.2.20120.3" + "version": "5.0.100-preview.5.20251.2" }, "tools": { - "dotnet": "5.0.100-preview.2.20120.3", + "dotnet": "5.0.100-preview.5.20251.2", "runtimes": { "dotnet/x64": [ "$(MicrosoftNETCoreAppInternalPackageVersion)" diff --git a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj index 5e95e71c89..62a1e9eece 100644 --- a/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj +++ b/src/Mvc/Mvc.Razor.RuntimeCompilation/src/Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.csproj @@ -1,9 +1,12 @@  - Runtime compilation support for Razor views and Razor Pages in ASP.NET Core MVC. $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 + + + $(NoWarn);NU5129 + true aspnetcore;aspnetcoremvc;razor true diff --git a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj index 412ba505cf..1df0843175 100644 --- a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj +++ b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.csproj @@ -1,9 +1,12 @@  - Support for writing functional tests for MVC applications. $(DefaultNetCoreTargetFramework) $(NoWarn);CS1591 + + + $(NoWarn);NU5129 + true aspnetcore;aspnetcoremvc;aspnetcoremvctesting true @@ -21,5 +24,4 @@ - diff --git a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets index 452fc9909d..8e9f7093e1 100644 --- a/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets +++ b/src/Mvc/Mvc.Testing/src/Microsoft.AspNetCore.Mvc.Testing.targets @@ -23,7 +23,7 @@ - + - <_Parameter1>%(WebApplicationFactoryContentRootAttribute.AssemblyName) @@ -55,5 +55,5 @@ - + \ No newline at end of file diff --git a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj index a3858977bb..7569eb44e2 100644 --- a/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj +++ b/src/ProjectTemplates/BlazorTemplates.Tests/BlazorTemplates.Tests.csproj @@ -70,7 +70,7 @@ - + $([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)')) $(TestTemplateCreationFolder)$(TestTemplateTestsProps) diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj index 9c49e2f2e3..1f1359c1eb 100644 --- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj +++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj @@ -73,7 +73,7 @@ - + $([MSBuild]::NormalizePath('$(OutputPath)$(TestTemplateCreationFolder)')) $(TestTemplateCreationFolder)$(TestTemplateTestsProps) diff --git a/src/Servers/IIS/build/testsite.props b/src/Servers/IIS/build/testsite.props index 4ff733d387..aacd1d8b27 100644 --- a/src/Servers/IIS/build/testsite.props +++ b/src/Servers/IIS/build/testsite.props @@ -59,17 +59,27 @@ + + BeforeTargets="BuildDepsJson;CoreBuild" + DependsOnTargets="GenerateBuildDependencyFile;PrepareInjectionApp"> + + BeforeTargets="Publish" + DependsOnTargets="GeneratePublishDependencyFile;CopyFilesToPublishDirectory;PrepareInjectionApp"> diff --git a/src/Shared/E2ETesting/E2ETesting.targets b/src/Shared/E2ETesting/E2ETesting.targets index f3e73276b0..5726735dfb 100644 --- a/src/Shared/E2ETesting/E2ETesting.targets +++ b/src/Shared/E2ETesting/E2ETesting.targets @@ -77,7 +77,7 @@ - + <_ContentRootMetadata Condition="'%(_ContentRootProjectReferences.Identity)' != ''" @@ -98,7 +98,7 @@ - + <_SeleniumE2ETestsSupportedAttributeValue>false <_SeleniumE2ETestsSupportedAttributeValue Condition="'$(SeleniumE2ETestsSupported)' == 'true'">true @@ -118,7 +118,7 @@ - +