Auto-Incrementing Build Number in Visual Studio and WiX Installer

In AssemblyInfo.cs, remove the “AssemblyFileVersion” attribute, and set “AssemblyVersion” to contain “*” where you want to include the revision and build numbers, like 1.5.*

In the WiX installer’s .wxs file, in the “Product” node, set the “Version” property to look like this:
where FileId is the ID of the file to take the version number from.

Credit to these two StackOverflow posts: