-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Targeting Blazor WebAssembly project to .NET Standard 2.1 breaks at runtime #16765
Comments
This looks like some new metadata issue in linker. @lewing could you extract linker repro out of this? |
Don't mean to hassle, but I was just wondering if this will be complete by the time the final release of .NET Core 3.0 comes out later in the month? |
@BenjaminCharlton No, this fix won't be ready in time for the next preview Blazor Webassembly release that's going out with the NET Core 3.0 release. It will be a few more weeks until we have a fix for this. |
Ok thanks for the information. Keep up the great work! |
Will this be fixed with .NET Core 3.1, the Blazor WASM release in May 2020, or at a different point in time? |
Related to #15833 ? |
Just came across this issue myself and found it here. Until this is fixed, we cannot use C# 8 language features in a Blazor app, as to do so requires targeting .NET Standard 2.1 :-( |
@marek-safar what's the latest on this? |
I spent some time looking at this today and it appears to be related to assembly resolution when the linker is used. In particular after the linker has run we appear to be ending up with a version of System.Threading.Tasks.Extensions.dll that triggers the issue. If I replace that assembly with the mono bcl version the app starts correctly. |
Thanks @lewing. Is this something you have control over of is this something we break somewhere in Blazor? |
I think I've found the issue here, testing now. |
dotnet/aspnetcore@master...lewing:resolve-with-linker is a quick workaround that demonstrates the problem. In the linker case _BlazorDependencyInput references assemblies that have been resolved against the wrong bcl. The workaround uses the linker to resolve the assemblies and orders the directories so that we resolve against the wasm bcl first. |
Thanks Larry! It seems clear then that this is not a Mono issue, but rather is something we need to update in Blazor, which I'm doing based on your approach at dotnet/aspnetcore#16808. This can be closed IMO. |
Closing this based on issue discussions |
So is this issue fixed? or moved to a dofferent repo? |
Hi @ebbypeter. Targeting .NET Standard 2.1 should be working with the latest Blazor WebAssembly previews. If you're finding otherwise, please let us know by opening a new issue with details about the problem you're seeing. |
Repro steps:
Expected result: Runs successfully
Actual result:
Workaround:
Disable the IL linker by setting
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
.The text was updated successfully, but these errors were encountered: