Blazor Wasm Standalone 'Could not resolve type' on publish - Release
Hi! I have a MVC web app and I've been trying to add razor components using blazor wasm. I've been having problems when publishing, when I debug everything works fine but after publishing to an IIS web server I'm getting an error while trying to load Blazor on the browser.
blazor.webassembly.js:1 crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: Could not resolve type with token 0100007a from typeref (expected class 'System.Reflection.FieldInfo' in assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') System.TypeLoadException: Could not resolve type with token 0100007a from typeref (expected class 'System.Reflection.FieldInfo' in assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') at Microsoft.AspNetCore.Components.ComponentBase.<.ctor>b__6_0(RenderTreeBuilder builder) at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder , RenderFragment , Exception& ) Dt @ blazor.webassembly.js:1I think it has something to do with trimming because if I publish using debug configuration it actually works pretty well. Has anyone had this problem before?
0 Replies