Use WixToolset to create the winform installation package, wixtoolsetwinform
Preparations
To use Wix, first download Wixtoolset from the official website. After the installation is downloaded, start visual studio and create a new project. You can see that the Windows Installer XML option is displayed on the left-side menu bar.
Tool used: visual studio 2010
Wix version (WiX v3.7 (Stable ))
Practice
The preparation is complete. Now we want to create an installation package instance and see how Wix works.
Start visual studio, create a winform project named "AppDemo", and create a solution.
The project interface has only one simple Label and displays "this is my first installation package ".
Add a project to the solution.
After the creation is complete, reference the previously created winform application, open Product. wxs, and insert the following code in & lt; ComponentGroup & gt; at the bottom.
<Component Id = "ProductComponent"> <File Source = "$ (var. AppDemo. TargetPath)"/> </Component>
The installation package is displayed in the debug folder of the project. Click MySetup. msi to install the package.
After the installation is complete, find the installed program in the corresponding folder.
Double-click the .exe program. The program runs successfully and the attempt is successful.
In the future, we will package our products using Wix.