This guide explains how to create a standard Windows MSI installer for MouseEffects using Visual Studio Setup Project. The installer will deploy the application to Program Files, create Start Menu shortcuts, and optionally configure the application to launch at Windows startup via a registry key. Visual Studio Setup Projects generate standard MSI files that follow Windows Installer conventions, providing users with a familiar installation experience including Add/Remove Programs integration, repair functionality, and clean uninstallation. This method requires Visual Studio 2019 or later with the "Microsoft Visual Studio Installer Projects" extension installed. The resulting MSI can be distributed to end users and installed with standard Windows installer behavior, including silent installation support via command line parameters.
- Visual Studio 2019 or later (Community, Professional, or Enterprise)
- Microsoft Visual Studio Installer Projects extension
- MouseEffects solution builds successfully
- Open Visual Studio
- Go to Extensions → Manage Extensions
- Select Online in the left panel
- Search for "Microsoft Visual Studio Installer Projects"
- Click Download
- Close Visual Studio to complete the installation
- Follow the VSIX installer prompts
- Restart Visual Studio
- Open the MouseEffects.sln solution in Visual Studio
- In Solution Explorer, right-click the Solution 'MouseEffects'
- Select Add → New Project...
- In the search box, type "Setup Project"
- Select Setup Project (not Setup Wizard)
- Configure the project:
- Name:
MouseEffects.Setup - Location:
src\folder (alongside other projects)
- Name:
- Click Create
- In Solution Explorer, click on MouseEffects.Setup project
- In the Properties window (press F4 if not visible), set:
| Property | Value |
|---|---|
| ProductName | MouseEffects |
| Manufacturer | MouseEffects |
| Version | 1.0.0 |
| TargetPlatform | x64 |
| InstallAllUsers | True |
- Right-click MouseEffects.Setup project
- Select Add → Project Output...
- In the dialog:
- Project: Select
MouseEffects.App - Output type: Select
Primary Output
- Project: Select
- Click OK
- Right-click MouseEffects.Setup project
- Select Add → Project Output...
- Select
Content Filesif your project has any - Click OK
- Right-click Application Folder in the File System view
- Select Add → File...
- Navigate to
src\MouseEffects.App\bin\Release\net8.0-windows\plugins\ - Select all plugin DLLs:
MouseEffects.Effects.ParticleTrail.dllMouseEffects.Effects.LaserWork.dllMouseEffects.Effects.ScreenDistortion.dll
- Click Open
- Right-click Application Folder
- Select Add → Folder
- Name it plugins
- Drag the plugin DLLs into this folder
- In Solution Explorer, right-click MouseEffects.Setup
- Select View → File System
- Click on Application Folder in the left panel
- In the Properties window, set:
| Property | Value |
|---|---|
| DefaultLocation | [ProgramFiles64Folder]\MouseEffects |
- In the File System view, right-click User's Programs Menu
- Select Add → Folder
- Name the folder MouseEffects
- Right-click the new MouseEffects folder
- Select Create New Shortcut
- In the dialog, navigate to Application Folder
- Select Primary output from MouseEffects.App
- Click OK
- Rename the shortcut to MouseEffects
- Right-click User's Desktop
- Select Create New Shortcut
- Select Primary output from MouseEffects.App
- Rename to MouseEffects
- In Solution Explorer, right-click MouseEffects.Setup
- Select View → Registry
- In the Registry view, expand HKEY_CURRENT_USER
- Right-click Software → Add → Key → Name: Microsoft
- Right-click Microsoft → Add → Key → Name: Windows
- Right-click Windows → Add → Key → Name: CurrentVersion
- Right-click CurrentVersion → Add → Key → Name: Run
- Right-click Run → New → String Value
- Set the Name to:
MouseEffects - Set the Value to:
[TARGETDIR]MouseEffects.App.exe
Note: This will make the application start automatically when Windows starts. If you want this to be optional, you'll need to create a custom installer dialog or handle it within your application settings.
- In Solution Explorer, right-click the Solution
- Select Project Dependencies...
- In the Projects dropdown, select MouseEffects.Setup
- Check the box for MouseEffects.App
- Click OK
This ensures the application is built before the installer.
- Set the build configuration to Release
- Right-click MouseEffects.Setup project
- Select Build
- Wait for the build to complete
The MSI installer will be created at:
src\MouseEffects.Setup\Release\MouseEffects.Setup.msi
- Navigate to the Release folder
- Double-click MouseEffects.Setup.msi
- Follow the installation wizard
- Verify the application is installed in
C:\Program Files\MouseEffects - Check the Start Menu for the shortcut
- Verify the startup registry key exists (if configured)
- Open Settings → Apps → Installed Apps
- Find MouseEffects
- Click Uninstall
- Verify all files and registry keys are removed
For automated deployments, you can install silently:
:: Standard silent install
msiexec /i MouseEffects.Setup.msi /quiet
:: Silent install with logging
msiexec /i MouseEffects.Setup.msi /quiet /log install.log
:: Silent install to custom location
msiexec /i MouseEffects.Setup.msi /quiet TARGETDIR="D:\CustomPath\MouseEffects"
:: Silent uninstall
msiexec /x MouseEffects.Setup.msi /quiet- Ensure the Microsoft Visual Studio Installer Projects extension is installed
- Restart Visual Studio after installing the extension
- Build the main solution first: Build → Build Solution
- Then build the Setup project
- Ensure the target machine has .NET 8.0 Runtime installed, OR
- Publish the app as self-contained (see below)
If you want the installer to work without requiring .NET to be pre-installed:
- First publish the app as self-contained:
dotnet publish src\MouseEffects.App\MouseEffects.App.csproj -c Release -r win-x64 --self-contained true -o publish- In the Setup Project, instead of adding Project Output, add files directly from the
publishfolder
When releasing a new version:
- Update the Version property in the Setup project properties
- Update the ProductCode (right-click project → Properties → click the "..." button next to ProductCode to generate new GUID)
- Keep the UpgradeCode the same (this allows upgrades to replace old versions)
- Rebuild the installer