Do Add-In need realy work in this way?

May 19, 2010 at 11:28 AM

When I work in debug mode and run Start Debuging (F5) my programm version is incrementing, why? Can i set increment only when i switch Release mode?

My solution contains 9 project and each time when I build solution programm version increments at +9.

For exapmle now my version is when I build version go to, build again version go to!

May 19, 2010 at 1:28 PM

You need to change the Condition section (Configuration Name).  It is probably set to "Any".  Change it to "Release" and it will only increment when your solution is "Release".

You can also change the the "Build Action" to Build or ReBuild so that you only increment on a Build and not on a ReBuild (or visa versa).

May 19, 2010 at 1:40 PM
Edited May 19, 2010 at 1:41 PM

and how solve, problem with my 9 project, each time when i run Build, programm version is incremented 9 times, because each project are Build and if I undersant right on each Build version is incremented + 1 and there is 9 Builds

May 19, 2010 at 1:58 PM

How are you building these projects?  I build my solution which increments each project individually and only once.  

If you build the same project 9 times then by design it would increment 9 times.

May 19, 2010 at 2:20 PM

In my solution explorer is SetupProject when I need make installation for program I select this project right mouse click and Build, this build each project. Some times I select solution and make Build.

Maybe I know where is the problem I have only one AssemblyInfo.cs file and reference it for all 9 project.

And when Builds first project Add-In change version first time, when Builds second time Add-In change version second time and so nine times.


May 19, 2010 at 2:25 PM

Ahhh... that makes sense now, the add-in doesn't know that you are using a shared AssemblyInfo.cs file and it increments it for each project.  Not sure where you would to set that.  Maybe the developers will have an idea.

May 19, 2010 at 2:30 PM

Maybe I need report it like bug?


May 19, 2010 at 2:38 PM

Maybe not a bug, but a feature request... maybe there is something in place already (that I'm not aware of) or they can add a setting to only increment once per build.

May 19, 2010 at 3:54 PM
If you want to increment a version in a assemblyinfo file that is shared by multiple projects, you'll have to specify it at solution level. So instead of setting the same assembly for every project you just set it once at the root (solution) node.
May 19, 2010 at 4:49 PM
I don't understand what exactly I need to do! Can you explain one more time?
May 19, 2010 at 5:28 PM
I've created an example solution that has one shared assembly info file that is incremented at release build.
May 19, 2010 at 9:26 PM
Edited May 19, 2010 at 9:27 PM
Before I try that is v2.1 without any luck. After a few attempts, I decide install v2.2 Beta. And in beta this thing works like a charm (I create my own Solution with two project with shared AssemblyInfo.cs file). In your screenshot you are using v2.2 beta. One more question, can I turn off auto versioning for some solutions and for some solutions turn on automatic versioning? Because not always I need this feature. btw ... thanks for the help :)
May 20, 2010 at 7:02 AM
Edited May 20, 2010 at 7:05 AM
The addin only increments when: 1. When the Version Increment checkbox is checked (found in the settings dialog). 2. Increment settings are found at solution or project level. 3. Either the AssembyVersion or AssemblyFileVersion attribute is selected for increment in these settings. So by default the addin does not do a thing unless you tell it to. (Edit: Sorry, it seems that CodePlex doesn't like my Mac and removes my returns in my post, making it a bit unreadable ... I'll fix that later)