Blazor WASM Hosted project has three projects: client, server and shared.
To publish the solution as a one publish site, run the command
dotnet publish MyWasmSolution.sln -C Release --output .publish
The publish folder contain all DLLs of server/client and shared and wwwroot of both server and client including blazor.webassembly.js with all compressed file.
Then, move to the publish folder (the Content root, because dotnet run
consider the current folder as the Content root).
Run the next script:
cd path/to/folder/publish
dotnet foo.Server.dll
The index.html is loaded in the browser and if you click F12 (dev tools) you find no errors.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…