Build Blazor applications for production
To manually build your Blazor application for production:
- Open a command prompt or terminal and go to the directory of your Blazor application. If it is WebAssembly go to the
- Optionally change the database connection string(s) in
dotnet publish -c Release. This command builds your application in production.
- The build output will be in
bin/Release/net7.0/publish/(.NET 7) or
bin/Release/net6.0/publish/(.NET 6). Copy all files from this location to your server.
Follow Microsoft’s official deployment instructions.