Newbie - how to get AssemblyInfo version info to Wise Installer?

Hi,

I'm new to FB, trying to setup our builds.

I'm using the 'Build VS.NET Solution' action to build a project, and it correctly updates AssemblyInfo.cs with the current version info.

The next action I use is 'Wise Windows Installer Project', to create a Wise installer.  For this action, I need to specify the Property "ProductVersion", but I can't figure out how to get the version string (e.g. 1.2.3.4) from the previous build action.

I have tried: "ProductVersion=%AssemblyInfo.BuildVersion%", but that doesn't work.

Anyone know how to do this?

Thanks!

Hi Mike

There are a bunch of ways to do this :

The best way to do this is define a property set, using the Define PropertySet action. Set the PropertySet Type to .Net Assembly Version Numbers, give it a name (e.g. Assembly Version). Add a “Property Set Assign Values” action, and specify the values you want.

Then in your VS.NET Action, Turn on the option to use the property set for assembly info, select your propertyset from the list. Create a project variable to hold the string with the assembly version, add a “PropertySet To Variable” action to massage the values into the format you want in Wise, select the variable you defined before from the drop down list, and add the properties you want in wise with separators etc.
In your wise you can then add the property : “ProductVersion=%MyAssemblyInfoVariable%”

Vincent,

Thanks for the reply.   I understand what you said, but I still have the same problem.  From your instructions:

Add a "Property Set Assign Values" action, and specify the values you want

The version info is determined/assigned by the "Build VS.NET Solution" action.  So, how do I get the most recent version info, assigned within that action, into the PropertySet?

 

More info if it helps:

There are just two actions (currently) in my Action List:

 

Build VS.NET Solution [c:\blahblah\mysolution.sln]
Wise Windows Installer Project [c:\blahblah\myinstaller.wsi]


In the Assembly Info tab of the 'Build VS.NET Solution' dialog box, I check "Update Assembly Info", and fill in all the assembly info.  In addition, I checked the "Auto Increment Build" option, so the build number gets incremented automatically.

 

 

Thanks,

Mike

 

 

Just a followup... I did find a way to get this to work:

Define Variable action ("VERSIONINFO")
Build VS.NET Solution action [c:\blahblah\mysolution.sln]
Extract Version Info action (extracts version right from the .exe generated in the previous action)
Wise Windows Installer Project action (set Property ProductVersion=%VERSIONINFO%)

And it works!

If there is a better way, please let me know.  Thanks!