-
When trying to build and run my Blazor WASM project on my PC, when I try to load a particular component using SkiaSharp, I get this exception:
However, when I re-built the project on a remote build server, downloaded the published artifact, and ran that from my PC, the component loaded correctly. I analyzed the difference in the publish output from the build server and my PC, and I narrowed the issue down to the Blazor framework files (in wwwroot/_framework). When I replaced the contents of this folder from the working version to the failing version, the issue disappeared. I ran a diff on the _framework folder to see which files where different, and got this output:
I tried completely uninstalling the .NET 8 SDK and all workloads, then re-installing both the SDK and the wasm-tools workload. I still see the same differences in .wasm file output. Does anyone know what could be the difference on my machine vs others causing the differing publish output? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I believe I fixed this issue. I tried building my project in a VM and I noticed that I got different output when I tried running workload restore. VM:
Problem machine:
I tried completely uninstalling and reinstalling the .NET 8 SDK, and that still didn't fix the problem. It turned out that I had an environment variable "MSBuildEnableWorkloadResolver" set to false for some reason. Removing that variable, completely cleaning the project, running workload restore again, and then rebuilding fixed my issue. |
Beta Was this translation helpful? Give feedback.
I believe I fixed this issue. I tried building my project in a VM and I noticed that I got different output when I tried running workload restore.
VM:
Problem machine: