Skip to content

Error when running blazor wasm in .Net 5.0 #22208

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

Closed
YairHalberstadt opened this issue May 26, 2020 · 1 comment
Closed

Error when running blazor wasm in .Net 5.0 #22208

YairHalberstadt opened this issue May 26, 2020 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. question Status: Resolved

Comments

@YairHalberstadt
Copy link

I'm not sure if blazor wasm is currently supported in .Net 5.0 preview 4, in which case feel free to close this, but thought I would try it out, as I need some types which are not available in .Net Standard.

When I converted my existing .Net STandard 2.1 blazor application to .Net 5.0 preview 4, it built fine, but when I ran it, I got this error:

blazor.webassembly.js:1 System.BadImageFormatException: Could not resolve field token 0x0400000c, 
due to: Could not set up parent class, due to: Could not set up parent class, 
due to: Could not set up parent class, due to: Could not load type of field 'Microsoft.JSInterop.JSRuntime:_cancellationRegistrations' (4) 
due to: Could not resolve type with token 0100001c from typeref (expected class 'System.Threading.CancellationTokenRegistration' in assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
assembly:System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a type:System.Threading.CancellationTokenRegistration member:(null)
assembly:Microsoft.JSInterop.dll type:JSRuntime member:(null)
assembly:Microsoft.JSInterop.dll type:JSInProcessRuntime member:(null)
assembly:Microsoft.JSInterop.WebAssembly.dll type:WebAssemblyJSRuntime member:(null)
assembly:Microsoft.AspNetCore.Components.WebAssembly.dll type:DefaultWebAssemblyJSRuntime member:(null)
@javiercn
Copy link
Member

@YairHalberstadt thanks for contacting us.

Blazor WebAssembly is not currently supported in .NET 5.0. We are working on adding support now that the 3.2 release is out.

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. question labels May 26, 2020
@ghost ghost added the Status: Resolved label May 26, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Answered Resolved because the question asked by the original author has been answered. question Status: Resolved
Projects
None yet
Development

No branches or pull requests

2 participants