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:
Steve Sanderson 2018-02-15 10:19:35 +00:00
parent e046dfca6d
commit 2ebfddc237
7 changed files with 12 additions and 12 deletions

View File

@ -1,12 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<!-- Currently, the MonoWASM BCL only supports netstandard2.0, not netcoreapp2.0,
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>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->

View File

@ -60,10 +60,10 @@
function preloadAssemblies(loadAssemblyUrls) {
var loadBclAssemblies = [
'netstandard',
'mscorlib',
'System',
'System.Core',
'System.Runtime'
];
var allAssemblyUrls = loadAssemblyUrls

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<!-- Local alternative to <PackageReference Include="Microsoft.AspNetCore.Blazor.Build" /> -->

View File

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<!-- Local alternative to <RunArguments>blazor serve</RunArguments> -->
<RunCommand>dotnet</RunCommand>
<RunArguments>run --project ../../src/Microsoft.AspNetCore.Blazor.DevHost serve</RunArguments>
</PropertyGroup>

View File

@ -14,6 +14,10 @@
<!-- Ensures this project is built before the consuming project, but without
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) -->
<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>
</Project>

View File

@ -87,7 +87,6 @@ namespace Microsoft.AspNetCore.Blazor.Server.Test
"/System.IO.Compression.FileSystem.dll",
"/System.Net.Http.dll",
"/System.Numerics.dll",
"/System.Runtime.dll",
"/System.Runtime.Serialization.dll",
"/System.Runtime.Serialization.Primitives.dll",
"/System.Runtime.Serialization.Xml.dll",

View File

@ -1,9 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netstandard2.0</TargetFramework>
<!-- Local alternative to <RunArguments>blazor serve</RunArguments> -->
<RunCommand>dotnet</RunCommand>
<RunArguments>run --project ..\..\..\src\Microsoft.AspNetCore.Blazor.DevHost serve</RunArguments>
</PropertyGroup>