Hi,
Based on my understanding, you want to build the setup project with MSBuild and automatically increase the version of the MSI package, right?
Unlike the VB.Net and C# project (XML based project file), setup project (.vdproj file) is not MSBuild formatted project file. Thus you cannot use MSBuild to build the setup project directly. Usually, we call Exec task to invoke devenv (Visual Studio) to build a setup project.
When I change Version from 1.0.1 to 1.0.2 in Visual Studio and I found the different between the .vdproj file is list below (using
WinDiff from Windows SDK). Changes are in bold style
"ProductCode" = "8:{79523FF7-20E0-40A3-BA42-2CDEAA0DDB2C}"
"ProductCode" = "8:{38B055DE-AD96-4B08-89DC-96417AF3BA55}" "PackageCode" = "8:{F16D8DE7-7A09-4532-B9DD-825D8AF33E81}"
"PackageCode" = "8:{42D3558F-97CE-41B1-8E45-9951B98EBFCA}"
"ProductVersion" = "8:1.0.1"
"ProductVersion" = "8:1.0.2"
One possible way is that you can write your own task to make these changes, and then call Exec task to build the setup project.
Howerver, as WiX provide you a standard MSBuild formatted project, I recommend you use this toolset.
http://wix.sourceforge.net/Thanks,
Rong-Chun Zhang.
Please mark the replies as answers if they help and unmark if they don't.