A professional foundation for developers to transform web surfaces into native Windows desktop applications. This template is designed to provide a lightweight, high-performance wrapper for any web-based dashboard, tool, or site.
- Native x86 Architecture: Specifically optimized for standard Windows environments and compatibility.
- WebView2 Engine: High-performance rendering via the modern Microsoft Edge (Chromium) engine.
- Deployment Ready: Clean project structure, prepared for integration with WiX Toolset to create
.msiinstallers. - Lightweight: Minimal boilerplate, focusing on performance and ease of use.
Follow these steps to create your own wrapper application using this template:
Click the "Use this template" button at the top of this repository to create your own copy of this project under your account or organization.
- Open the solution (
.sln) in Visual Studio 2022. - Ensure the .NET Desktop Development workload is installed in your Visual Studio instance.
- Restore NuGet packages to ensure Microsoft.Web.WebView2 is correctly loaded.
Navigate to the MainWindow.cs file and replace the placeholder URL with your target website address:
// Locate this line in MainWindow.cs
webView.CoreWebView2.Navigate("[https://alexgaming.netlify.app](https://alexgaming.netlify.app)");- Set your build configuration in Visual Studio to Release.
- Set the platform to x86.
- Build the solution to generate your standalone executable.
If you prefer using the command line or want to automate your build process, use the following .NET CLI commands:
dotnet restore --arch x86
dotnet build -c Release -r win-x86This command generates an optimized, self-contained executable:
dotnet publish -c Release -r win-x86 --self-contained true -p:PublishReadyToRun=trueNavigate to your Setup directory and run the WiX compiler and linker:
candle.exe Product.wxs
light.exe Product.wixobj -o WebToApp_Setup.msi- Framework: .NET 6.0 (Windows)
- Platform: x86
- Dependencies: Microsoft.Web.WebView2
- Installer Support: Compatible with WiX Toolset v3.11+
Distributed under the MIT License. This means you are free to use, modify, and distribute this template for private and commercial projects.
Created and maintained by Alex Studios