Skip to content

Create your first installation package

To create your first installation package with the WiX Toolset, you only need a text editor and the .NET SDK. If you have Visual Studio 2022, you have both.

Open a command prompt and follow these steps.

  1. Create a new directory for your first WiX project.

    C:\>
    md C:\src\QuickStart
    cd C:\src\QuickStart
  2. Create a new text file to serve as your WiX project file named QuickStart.wixproj with the following content.

    QuickStart.wixproj
    <Project Sdk="WixToolset.Sdk/5.0.1">
    </Project>
  3. Create a new WiX source file named Package.wxs with the following content.

    Package.wxs
    <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
    <Package Name="QuickStart Example" Manufacturer="ACME Corp"
    Version="0.0.1" UpgradeCode="PUT-GUID-HERE">
    <File Source="example.txt" />
    </Package>
    </Wix>
  4. Create a new text file named example.txt with any content you want.

    example.txt
    This is example.txt. It's just example data.
  5. Build the project.

    C:\src\QuickStart>
    dotnet build

Success

Your MSI package is bin\Debug\QuickStart.msi. Now you are ready to install it.