In this tutorial, we will create a C# Windows Form Application and then use WiX to create an installer for the application.
<!-- TODO: Insert your files, registry keys, and other resources here. -->
Delete that line and replace it with the following lines of code:
<File Source="$(var.MyApplication.TargetPath)" />
That's it! Now you have a working installer that installs and uninstalls the application.
If you type that code into the editor (instead of copying and pasting from this example) you will notice that IntelliSense picks up the valid elements and attributes. IntelliSense with WiX in Visual Studio can save you significant amounts of typing and time when searching for the name of the elements or attributes as you become more comfortable with the WiX language.
The line of code you added instructs the WiX toolset to add a file resource to the setup package. The Source attribute specifies where to find the file for packaging during the build. Rather than hard-code values for these attributes into our source code, we use the WiX preprocessor variables that are passed to the WiX compiler. More information about using preprocessor variables, including a table of all supported values, can be found in the Adding Project References topic.