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/net10.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 APIproject (call itMyApp.Server). You may need to disable swagger for theindex.htmlto be served properly.Add a NuGet reference to
Uno.Wasm.Bootstrap.ServerIn your
Program.csstartup, add the following to setup yourWebApplicationinstance:using Uno.Wasm.Bootstrap.Server; ... app.UseUnoFrameworkFiles(); app.MapFallbackToFile("index.html");Add a project reference to the
WasmprojectBuild and deploy
MyApp.Server