I'm sure there are many different ways to go at this. I was originally using Wix 3.7 when I was using the WixExtededBA and the bal:autoversion. If I had stayed with Wix 3.7 I would have used the source code at http://wixextba.codeplex.com/ to create a wix extension and modify the auto version algorytum as I needed. I had started down that path an extension dll working for Wix 3.7. However for other reasons I switched my project to use Wix 3.8, at which point for some reason I could not get the wix extension dll to compile. I never figured out what I was doing wrong, but I still think that creating a wix extension DLL is the better approach.
I needed to figure out how to do MSBUILD tasks for another reason and as I was doing that I also used that approach to tackle the auto version issue. It is too involved to present a lot of details, and my legal department is still debating whether they approve of my participation in posting code. In VS2010 (for me) select the project and then select 'Unload Project' in the context menu. Then select edit the project file. Then the easiest way to create a MSBUILD task is to create an in-line task. http://msdn.microsoft.com/en-us/library/dd723643.aspx The drawback to creating an in-line task is that you do not get feedback on compile errors until run time. Since I am also learning C# (from a C++ background) I switched to creating an in-process Task (dll). http://msdn.microsoft.com/en-us/library/t9883dzc.aspx When running an in-line task if there is an error, a verbose msbuild log provides the path to the C# file which MSBuild generated. So I used this detail going back and forth between in-line and DLL as needed to figure out how to prototype different variables. Regarding the version algorythm that I implemented: 1) I created a master text file which originally had only the version in it "x.x.x.x". Eventually I decided to add several control flags to the data. (i.e. major.minor.build(x).revision.f1.f2... ). Major, minor, and revision are static values which I set manually, so the MSBuild tasks only increment the build value and set the flags. 2) In the C# library project (for the Task DLL) I created a class derived from ITask which: a) reads in the master text file b) Splits (or tokenized) the string to a string array. c) read the two flags were f1 is my Bundle flag and f2 (etc) is a flag for each primary MSI package. d) If each flag is zero then increment the build value, and set all flags to 1. e) Save the values and flags back to the master text file. f) Format a string with the XML contents of a wxi file and insert the version. Write this wxi file out to the project folder. So the above Task is called in Target "BeforeBuild" in each project (MSI or Bundle). Then in Target "AfterBuild" I call another class derived from ITask in the MSBuild DLL which resets the specific flag. If there is an error in the build of the MSI that project will never call Target "AfterBuild" so if I get to "AfterBuild" I assume that the build succeeded. If this is the MSI project I clear the MSI flag. If the Bundle project I clear the Bundle flag in the master text file. I'm sure there are other ways to do this and I still think that the wix extension might be a better choice. But this is what I implemented for now. Some folks have mentioned that they increment revision to track changes in the Bundle. We use the Revision value for tracking changes to the deployment media, separate from the setup package, so I could not take that approach. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Burn-installer-upgrade-does-not-work-tp7589150p7589200.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users