From 5b30797592bf5f1619a093368038bf71f3f6fd1f Mon Sep 17 00:00:00 2001 From: Steve Sanderson Date: Tue, 12 Nov 2019 16:16:40 +0000 Subject: [PATCH] Blazor WebAssembly move to netstandard2.1 (#16808) * Now works on ns2.1, but links too much * Now only link System.* assemblies * Clean up. Also link Microsoft.Extensions.* now too, since it works. * x-plat slash consistency * Change all Blazor.* projects to netstandard2.1 * Further TFM updates * Stop linking Microsoft.Extensions for now, since it requires a more detailed treatment to avoid breaking things --- .../ref/Microsoft.AspNetCore.Blazor.csproj | 6 +++--- ...rosoft.AspNetCore.Blazor.netstandard2.1.cs} | 0 .../src/Microsoft.AspNetCore.Blazor.csproj | 2 +- .../src/targets/Blazor.MonoRuntime.targets | 18 +++++++++++++++--- ...crosoft.AspNetCore.Blazor.HttpClient.csproj | 6 +++--- ...etCore.Blazor.HttpClient.netstandard2.1.cs} | 0 ...crosoft.AspNetCore.Blazor.HttpClient.csproj | 2 +- .../Client/BlazorWasm-CSharp.Client.csproj | 2 +- .../Shared/BlazorWasm-CSharp.Shared.csproj | 2 +- ...re.Blazor.DataAnnotations.Validation.csproj | 2 +- .../HostedInAspNet.Client.csproj | 2 +- ...oft.AspNetCore.Blazor.E2EPerformance.csproj | 2 +- .../MonoSanityClient/MonoSanityClient.csproj | 2 +- .../StandaloneApp/StandaloneApp.csproj | 2 +- .../BasicTestApp/BasicTestApp.csproj | 2 +- 15 files changed, 31 insertions(+), 19 deletions(-) rename src/Components/Blazor/Blazor/ref/{Microsoft.AspNetCore.Blazor.netstandard2.0.cs => Microsoft.AspNetCore.Blazor.netstandard2.1.cs} (100%) rename src/Components/Blazor/Http/ref/{Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs => Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs} (100%) diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj index d750edc189..88ca078caa 100644 --- a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.csproj @@ -1,10 +1,10 @@ - netstandard2.0 + netstandard2.1 - - + + diff --git a/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.0.cs b/src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs similarity index 100% rename from src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.0.cs rename to src/Components/Blazor/Blazor/ref/Microsoft.AspNetCore.Blazor.netstandard2.1.cs diff --git a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj index 0673c85b2d..be94e420a2 100644 --- a/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj +++ b/src/Components/Blazor/Blazor/src/Microsoft.AspNetCore.Blazor.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 Build client-side single-page applications (SPAs) with Blazor running under WebAssembly. true diff --git a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets index 69976d519b..b2de5481db 100644 --- a/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets +++ b/src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets @@ -421,11 +421,23 @@ has changed. 4) Add the file we just created to the list of file writes, to support incremental builds. --> + + <_BlazorDependencyAssembly Include="@(_BlazorDependencyInput)"> + $([System.String]::Copy('%(RelativeDir)').TrimEnd('\').TrimEnd('/')) + true + + <_MonoBaseClassLibraryFolder Include="$(MonoBaseClassLibraryPath);$(MonoBaseClassLibraryFacadesPath);$(MonoWasmFrameworkPath)" /> - <_BlazorAssembliesToLink Include="@(_BlazorDependencyInput->'-a "%(Identity)"')" /> - <_BlazorAssembliesToLink Include="@(IntermediateAssembly->'-a "%(FullPath)"')" /> + <_BlazorAssembliesToCopy Include="@(IntermediateAssembly->'-a "%(FullPath)"')" /> <_BlazorFolderLookupPaths Include="@(_MonoBaseClassLibraryFolder->'-d "%(Identity)"')" /> + + + <_BlazorFolderLookupPaths Condition="'%(_BlazorDependencyAssembly.IsLinkable)' == 'true'" Include="@(_BlazorDependencyAssembly->'-d "%(RelativeDirNoTrailingSlash)"')" /> + + + <_BlazorAssembliesToCopy Condition="'%(_BlazorDependencyAssembly.IsLinkable)' != 'true'" Include="@(_BlazorDependencyAssembly->'-a "%(FullPath)"')" /> + <_BlazorAssemblyDescriptorFiles Include="@(BlazorLinkerDescriptor->'-x "%(FullPath)"')" Condition="'@(BlazorLinkerDescriptor)' != ''" /> @@ -438,7 +450,7 @@ - + diff --git a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj index 8c5f6d9e13..6a3ca4305d 100644 --- a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.csproj @@ -1,10 +1,10 @@ - netstandard2.0 + netstandard2.1 - - + + diff --git a/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs b/src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs similarity index 100% rename from src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.0.cs rename to src/Components/Blazor/Http/ref/Microsoft.AspNetCore.Blazor.HttpClient.netstandard2.1.cs diff --git a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj index 18bdc5e1fe..be140d936e 100644 --- a/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj +++ b/src/Components/Blazor/Http/src/Microsoft.AspNetCore.Blazor.HttpClient.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 Provides experimental support for using System.Text.Json with HttpClient. Intended for use with Blazor running under WebAssembly. true diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj index c4eb65bded..c855c49821 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj +++ b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Client/BlazorWasm-CSharp.Client.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 3.0 diff --git a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj index 2a77f0c7cc..d849ca9036 100644 --- a/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj +++ b/src/Components/Blazor/Templates/src/content/BlazorWasm-CSharp/Shared/BlazorWasm-CSharp.Shared.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 7.3 diff --git a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj index a166d5f1f3..725b1f9811 100644 --- a/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj +++ b/src/Components/Blazor/Validation/src/Microsoft.AspNetCore.Blazor.DataAnnotations.Validation.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 Provides experimental support for validation using DataAnnotations. true false diff --git a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj index ef12ac3c4e..cb21b79a8c 100644 --- a/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj +++ b/src/Components/Blazor/testassets/HostedInAspNet.Client/HostedInAspNet.Client.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 Exe true 3.0 diff --git a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj index 9f796fdbcf..140762810f 100644 --- a/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj +++ b/src/Components/Blazor/testassets/Microsoft.AspNetCore.Blazor.E2EPerformance/Microsoft.AspNetCore.Blazor.E2EPerformance.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 true 3.0 diff --git a/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj b/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj index b186c39194..e01c600843 100644 --- a/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj +++ b/src/Components/Blazor/testassets/MonoSanityClient/MonoSanityClient.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 false false exe diff --git a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj index cddd429b6a..32156c56b8 100644 --- a/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj +++ b/src/Components/Blazor/testassets/StandaloneApp/StandaloneApp.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 true 3.0 diff --git a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj index 98357d0e88..9914ec4521 100644 --- a/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj +++ b/src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + netstandard2.1 3.0 true