last update: 01.05 | Init
This guide will walk you through setting up, building, and optionally publishing (Build .exe in 1 file (like release in github)) the FluAutoClicker WinUI 3 application.
- Visual Studio 2022 (latest version recommended)
- .NET 8.0 SDK (Windows 10.0.19041.0+)
- Internet connection for downloading dependencies
Follow the official Microsoft guide: Create your first WinUI 3 app
- Project Name:
FluAutoClicker(recommended to avoid namespace issues) - Framework:
.NET 8.0 (Windows 10.0.19041.0+)
- Overwrite the following files in your project with the versions from this repository:
App.xamlApp.xaml.csMainWindow.xamlMainWindow.xaml.cs
- Place
logo.icoandlogo.pnginto theAssets/folder.
- Add the following NuGet packages to your project:
System.Drawing.CommonMicrosoft.Windows.SDK.BuildToolsMicrosoft.WindowsAppSDK
- (Optional, for self-contained single EXE publishing) Add these lines to your
.csproj:<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> <WindowsPackageType>None</WindowsPackageType> <PublishSingleFile>true</PublishSingleFile> <SelfContained>true</SelfContained>
- Remove the following line from your
.csprojfile if present:<WindowsPackageType>MSIX</WindowsPackageType>
- In Visual Studio, select the Release configuration and your target platform (e.g., x64).
- Press F5 to run, or select Build → Build Solution to compile the application.
To create a self-contained single executable (EXE) without packaging:
- Open Developer Command Prompt for VS 2022.
- Navigate to your project directory:
cd path\to\FluAutoClicker
- Run the following command:
dotnet publish ^ --configuration Release ^ --framework net8.0-windows10.0.19041.0 ^ --runtime win-x64 ^ /p:PublishSingleFile=true ^ /p:PublishTrimmed=true ^ /p:PublishReadyToRun=true ^ --self-contained true - The published files will be located in:
bin\Release\net8.0-windows10.0.19041.0\win-x64\publish\
- Go to Build → Publish.
- Configure the following settings:
- Publish method: Folder
- Target framework: .NET 8.0 (Windows 10.0.19041.0+)
- Target runtime: win-x64
- Publish single file: true
- Click Publish
This project is licensed under the GNU General Public License.