This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Pre-build event to increment AssemblyFileVersion
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 27, 2008
11:09 AM
Pre-build event to increment AssemblyFileVersion
Hello,
I need to auto-increment AssemblyFileVersion before the setup project is built. In visual Studio there are pre- and post-build events. Are there analogues in IS Setup project?
PS I could use some other project that could be built the first in the solution, but I do not want to add it, because Setup project is only built on the server, while the rest development team see it as unloaded. Thus they do no need to build this additional project and modifications made by it.
I need to auto-increment AssemblyFileVersion before the setup project is built. In visual Studio there are pre- and post-build events. Are there analogues in IS Setup project?
PS I could use some other project that could be built the first in the solution, but I do not want to add it, because Setup project is only built on the server, while the rest development team see it as unloaded. Thus they do no need to build this additional project and modifications made by it.
(2) Replies
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 28, 2008
12:45 PM
There are no predefined sets of functionality for prebuild and postbuild events in InstallShield. However, information on what one other member of the community got to work for him can be found in his blog. Christopher Painter is one of the more knowledgable people in the community, so while I haven't tested any of what he suggests, I imagine it will work:
http://community.macrovision.com/archive/index.php?t-168511.html
http://community.macrovision.com/archive/index.php?t-168511.html
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 29, 2008
10:52 PM
My first question would be do you need to increment AssemblyVersion / AssemblyFileVersion or do you need to increment ProductVersion ( MSI Property ).
Normally I don't define AssemblyFileVersion, I let it just default to AssemblyVersion. The only real case where you want to increment one but not the other is when hotfixing strong named assemblies and you want costing to work properly.
ProductVersion is what you need to do to version the setup project.
I'm using MSBuild/TFS these days. For .NET projects, I use the AssemblyVersionTask and for InstallShield I use a little piece of custom code to do an XPath against my ISM XML document.
The best way I've found is to attrib all AssemblyInfo.cs files to +R before the `get` so TFS doesn't complain about writable files and then attrib them all back to -R after the get so they can be written.
Then I subscribe each individual .csproj ( or others ) to the task. This is to work around the fact that .NET prebuild events always fire whether or not the targets are actually out of date and anything even needs to be compiled.
The result is a perfect incremental build pattern that is compatible with MSI costing for minor upgrades. I've written about this patten in the past and you can find it here:
http://blog.deploymentengineering.com/2007/04/tfs-build-automation-with-vs2005-and.html
Normally I don't define AssemblyFileVersion, I let it just default to AssemblyVersion. The only real case where you want to increment one but not the other is when hotfixing strong named assemblies and you want costing to work properly.
ProductVersion is what you need to do to version the setup project.
I'm using MSBuild/TFS these days. For .NET projects, I use the AssemblyVersionTask and for InstallShield I use a little piece of custom code to do an XPath against my ISM XML document.
The best way I've found is to attrib all AssemblyInfo.cs files to +R before the `get` so TFS doesn't complain about writable files and then attrib them all back to -R after the get so they can be written.
Then I subscribe each individual .csproj ( or others ) to the task. This is to work around the fact that .NET prebuild events always fire whether or not the targets are actually out of date and anything even needs to be compiled.
The result is a perfect incremental build pattern that is compatible with MSI costing for minor upgrades. I've written about this patten in the past and you can find it here:
http://blog.deploymentengineering.com/2007/04/tfs-build-automation-with-vs2005-and.html