Publishing the build results
The easiest way to publish the build results is to use the Visual Studio publish menu on your project. This will allow to use all the features provided by the standard experience, as described in the Deploy to Azure App Service.
In the command line, to publish the app, use the following:
dotnet publish
The app will be located in the bin/Release/net9.0/publish/wwwroot
folder. More information about dotnet publish
can be found in the Microsoft docs.
Localization publishing
By default, the .NET runtime does not load all resource assemblies, but if you want to load all resources regardless of the user's culture, you can add the following to your project file:
<PropertyGroup>
<WasmShellLoadAllSatelliteResources>true</WasmShellLoadAllSatelliteResources>
</PropertyGroup>
Integration with ASP.NET Core
ASP.NET Core hosting is supported through the Uno.Wasm.Bootstrap.Server
package.
In order to host an Uno Platform App, you'll need to the following:
Create an
ASP.NET Core Web API
project (call itMyApp.Server
). You may need to disable swagger for theindex.html
to be served properly.Add a NuGet reference to
Uno.Wasm.Bootstrap.Server
In your
Program.cs
startup, add the following to setup yourWebApplication
instance:using Uno.Wasm.Bootstrap.Server; ... app.UseUnoFrameworkFiles(); app.MapFallbackToFile("index.html");
Add a project reference to the
Wasm
projectBuild and deploy
MyApp.Server