For the complete documentation index, see llms.txt. This page is also available as Markdown.

WebAssembly

The Blazor AI Migrator is expanding to support Blazor WebAssembly (WASM), offering a powerful alternative to the server-centric LiveView model. This addition allows your migrated applications to run C# code directly in the user's browser, bringing the web experience even closer to the performance of the original desktop app.

⚡ What is Blazor WebAssembly?

WebAssembly is a modern web standard that enables high-performance, binary code to run in the browser. In this model, the .NET runtime and your application assemblies are downloaded to the client machine, allowing the app to execute locally without a constant "tether" to the server.

Blazor Server vs Blazor WebAssembly
Blazor Server vs Blazor WebAssembly

🌟 Key Benefits of the WASM Model

By adding WebAssembly support, the migrator offers new strategic advantages for your modernized apps:

  • Offline Capability: Unlike the server model, WASM apps can continue to function even if the internet connection is interrupted, as the logic lives in the browser.

  • Zero Latency Interactivity: UI events (like clicking a tab or opening a menu) happen instantly on the client, eliminating the "network hop" required by the LiveView/SignalR model.

  • Server Offloading: Processing power is shifted from your expensive cloud servers to the user's own hardware, significantly reducing hosting costs for high-traffic applications.

  • Static Hosting: WASM apps can be served from simple, cost-effective storage like a Content Delivery Network (CDN) or Azure Static Web Apps, as they don't require a full ASP.NET Core server to run.

Main difference

🛠️ Updated Installation for WASM Support

To enable these features, you must add the following to your environment:

  1. WASM Build Tools: In the Visual Studio Installer, select the .NET WebAssembly build tools option under the ASP.NET and web development workload.

  2. CLI Command: Alternatively, you can run dotnet workload install wasm-tools from an administrative prompt.

  3. Project Configuration: Your project will now include a <RunAOTCompilation> property to trigger high-performance native execution.

Last updated