Last post Nov 30, 2019 10:03 PM by bruce (sqlwork.com)
Nov 27, 2019 03:38 AM|milop|LINK
I created a Blazor Webassembly app (3.1.0-preview3.19555.2) and added a reference to a .Net Core 3.0 Class Library project (my "Models" project).
When I compile the Blazor app I get this error:
error NU1201: Project Models is not compatible with netstandard2.1 (.NETStandard,Version=v2.1). Project Models supports: netcoreapp3.0 (.NETCoreApp,Version=v3.0)
According to this (https://docs.microsoft.com/en-us/dotnet/standard/net-standard) I shouldn't be having this problem.
Can anyone help?
Thanks in advance,
Nov 27, 2019 04:42 AM|Khuram.Shahzad|LINK
Currently this happens in Visual Studio 2019 Preview but not on command line
please have a look
Nov 27, 2019 11:47 AM|milop|LINK
Hi, Khuram. Thanks for responding.
My problem is actually opposite: .Net Standard 2.1 referencing .Net Core 3.1.
Does that make a difference? And what do you mean by "command line"? Do you mean "csc.exe"?
Nov 30, 2019 10:03 PM|bruce (sqlwork.com)|LINK
starting with .net standard 2.1, other frameworks can not be referenced (4.* or core).
if you are using blazor, you should use .net standard libraries to share code between blazor and server code.
thread support to web assembly, it’s not yet in the blazor runtime. Blazor is single threaded.