Switch client apps to netstandard2.0 to fix type load errors
Do a "git clean -xdf" on your local copy if you get runtime errors after updating to this.
This commit is contained in:
parent
e046dfca6d
commit
2ebfddc237
|
|
@ -1,12 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- Currently, the MonoWASM BCL only supports netstandard2.0, not netcoreapp2.0,
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
so there will be an error if you reference certain types directly from this
|
|
||||||
project (e.g., StringReader). To fix this, the TFM here should be netstandard2.0,
|
|
||||||
but that is inconvenient during builds so for now it stays as this. The issue
|
|
||||||
will go away if a later MonoWASM BCL supports netcoreapp2.0 fully. -->
|
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
|
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,10 @@
|
||||||
|
|
||||||
function preloadAssemblies(loadAssemblyUrls) {
|
function preloadAssemblies(loadAssemblyUrls) {
|
||||||
var loadBclAssemblies = [
|
var loadBclAssemblies = [
|
||||||
|
'netstandard',
|
||||||
'mscorlib',
|
'mscorlib',
|
||||||
'System',
|
'System',
|
||||||
'System.Core',
|
'System.Core',
|
||||||
'System.Runtime'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
var allAssemblyUrls = loadAssemblyUrls
|
var allAssemblyUrls = loadAssemblyUrls
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
|
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
|
||||||
<!-- Local alternative to <RunArguments>blazor serve</RunArguments> -->
|
<!-- Local alternative to <RunArguments>blazor serve</RunArguments> -->
|
||||||
|
<RunCommand>dotnet</RunCommand>
|
||||||
<RunArguments>run --project ../../src/Microsoft.AspNetCore.Blazor.DevHost serve</RunArguments>
|
<RunArguments>run --project ../../src/Microsoft.AspNetCore.Blazor.DevHost serve</RunArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,10 @@
|
||||||
<!-- Ensures this project is built before the consuming project, but without
|
<!-- Ensures this project is built before the consuming project, but without
|
||||||
adding a runtime dependency on the .dll (to be equivalent to a <PackageDependency>
|
adding a runtime dependency on the .dll (to be equivalent to a <PackageDependency>
|
||||||
given that the packed version of this project wouldn't add a .dll reference) -->
|
given that the packed version of this project wouldn't add a .dll reference) -->
|
||||||
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj" ReferenceOutputAssembly="false" PrivateAssets="all" />
|
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj">
|
||||||
|
<SetTargetFramework>TargetFramework=netcoreapp2.0</SetTargetFramework>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||||
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,6 @@ namespace Microsoft.AspNetCore.Blazor.Server.Test
|
||||||
"/System.IO.Compression.FileSystem.dll",
|
"/System.IO.Compression.FileSystem.dll",
|
||||||
"/System.Net.Http.dll",
|
"/System.Net.Http.dll",
|
||||||
"/System.Numerics.dll",
|
"/System.Numerics.dll",
|
||||||
"/System.Runtime.dll",
|
|
||||||
"/System.Runtime.Serialization.dll",
|
"/System.Runtime.Serialization.dll",
|
||||||
"/System.Runtime.Serialization.Primitives.dll",
|
"/System.Runtime.Serialization.Primitives.dll",
|
||||||
"/System.Runtime.Serialization.Xml.dll",
|
"/System.Runtime.Serialization.Xml.dll",
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
|
||||||
<!-- Local alternative to <RunArguments>blazor serve</RunArguments> -->
|
<!-- Local alternative to <RunArguments>blazor serve</RunArguments> -->
|
||||||
|
<RunCommand>dotnet</RunCommand>
|
||||||
<RunArguments>run --project ..\..\..\src\Microsoft.AspNetCore.Blazor.DevHost serve</RunArguments>
|
<RunArguments>run --project ..\..\..\src\Microsoft.AspNetCore.Blazor.DevHost serve</RunArguments>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue