Build VS.Net Solution

Hi there

we build our projects with the Build VS.Net SolutionAction and would like to update our AssemblyInfo.vb with the .NET Version in this Action.

In our AssemblyInfo.vb are more then one AssemblyVersion, AssemblyTitle and so on. Wraped with precompilervariables like this:

.#If VERSION_IS_PRODUCT1 Then
.Assembly: AssemblyCompany("company1")
.Assembly: AssemblyProduct("produkt1")
.Assembly: AssemblyVersion("1.2.3.4")
.Assembly: AssemblyFileVersion("1.2.3.4")
.Assembly: AssemblyTitle("titel1")


#ElseIf VERSION_IS_PRODUCT2 Then
.Assembly: AssemblyCompany("company2")
.Assembly: AssemblyProduct("produkt2")
.Assembly: AssemblyVersion("4.5.6.7")
.Assembly: AssemblyFileVersion("4.5.6.7")
.Assembly: AssemblyTitle("titel2")

#EndIf

 

If I set the precompilervariable "VERSION_IS_PRODUCT2" and run the Action, only the AssemblyInformation of the "VERSION_IS_PRODUCT1" are updated. It looks like the action takes the first Assemblytags which he founds.

Hope u can fix this.

 

Thank you

greeting from Germany

Manni

The action uses regex (with a small bit of extra logic) to find an update assembly info , so it has no way of handling IFDEFS. I would question why you even need the ifdefs since you are setting the attributes at build time anyway?

Thank you for the fast awnser.
To your question: We have one Project for more then one Company.
We handel color and some menupoints with ifdefs. Our licencemodul is managed by AssemblyProduct
so even in the time of programming we need the right Assemblyiinformations, thats why we use ifdefs.

Thanks for your time
Manni