You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dev/ai-prompts/2025-03-28 [swharden] target dotnet 10.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,12 @@ Perfect! The build is successful. The key changes I made to fix your Blazor WebA
26
26
27
27
Summary of Fixes:
28
28
* Updated Package References (in Sandbox.Blazor.csproj):
29
-
* Changed Microsoft.AspNetCore.Components.WebAssembly from version 8.0.10 to 10.0.0-*
30
-
* Changed Microsoft.AspNetCore.Components.WebAssembly.DevServer from version 8.0.10 to 10.0.0-*
29
+
* Changed Microsoft.AspNetCore.Components.WebAssembly from version 8.0.10 to 10.0.0-*
30
+
* Changed Microsoft.AspNetCore.Components.WebAssembly.DevServer from version 8.0.10 to 10.0.0-*
31
+
31
32
* Updated Script Loading (in index.html):
32
-
* Changed the Blazor script to use type="module" attribute: <scriptsrc="_framework/blazor.webassembly.js"type="module"></script>
33
-
* This is required in .NET 10 because the Blazor WASM runtime now uses ES6 modules for better performance and modern JavaScript standards
33
+
* Changed the Blazor script to use type="module" attribute: <script src="_framework/blazor.webassembly.js" type="module"></script>
34
+
* This is required in .NET 10 because the Blazor WASM runtime now uses ES6 modules for better performance and modern JavaScript standards
34
35
35
36
The error you were seeing (Failed to fetch dynamically imported module: https://localhost:7014/0) was caused by the mismatch between the .NET 10 runtime expecting ES6 module loading while the HTML was using the old .NET 8 script loading pattern.
36
37
You should now be able to run your Blazor WebAssembly application successfully on .NET 10!
@@ -51,9 +52,9 @@ Now let's rebuild the project to see if this resolves the SkiaSharp native DLL i
51
52
The build is successful. The changes I made:
52
53
* Updated ScottPlot.Blazor.csproj: Made Microsoft.AspNetCore.Components.Web version conditional - using 10.0.0 for .NET 10 and 8.0.0 for .NET 8
53
54
* Updated Sandbox.Blazor.csproj:
54
-
* Added WasmNativeStrip=false to prevent stripping of native WASM bindings
55
-
* Added explicit SkiaSharp.Views.Blazor package reference to ensure the WebAssembly native bindings are properly included
56
-
*
55
+
* Added WasmNativeStrip=false to prevent stripping of native WASM bindings
56
+
* Added explicit SkiaSharp.Views.Blazor package reference to ensure the WebAssembly native bindings are properly included
57
+
57
58
The WasmNativeStrip=false property is important because it prevents the linker from removing the SkiaSharp native WebAssembly libraries that are needed at runtime.
58
59
59
60
Try running the application again. If you still get the SkiaSharp DLL error, we may need to check if SkiaSharp has a .NET 10-specific preview version available or if there are additional configuration steps needed for the WebAssembly native interop in .NET 10.
0 commit comments