Installer and versioning

  • Thread starter Thread starter Matthew
  • Start date Start date
M

Matthew

I found a piece of code that I can use to control the version of my
software:
<Assembly: Reflection.AssemblyVersion("1.0")>
I put this at the top of my Form1.vb file.

The question is, this version number does not replicate to my Setup Project
version.

Can this be done?

Matthew
 
Matthew said:
I found a piece of code that I can use to control the version of my
software:
<Assembly: Reflection.AssemblyVersion("1.0")>
I put this at the top of my Form1.vb file.

Did you already take a look at your project's "AssemblyInfo.vb" file? This
file will include this attribute too.
 
Matthew,
As Herfried stated, the AssemblyVersion is normally in the AssemblyInfo.vb
file, I normally leave it as "1.0.*", then add a
AssemblyInformationalVersion attribute to AssemblyInfo.vb that I manually
keep in sync with the Setup Project.

These are the entries I normally have in my AssemblyInfo.vb files (each
project):

<Assembly: AssemblyTitle("The VS.NET Project Title for this Assembly")>
<Assembly: AssemblyDescription("The Description of this Assembly")>
<Assembly: AssemblyCompany("The Company")>
<Assembly: AssemblyProduct("The VS.NET Solution Title")>
<Assembly: AssemblyCopyright("The Copyright for this Assembly")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>

<Assembly: Guid("... a valid guid ...")>

<Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyInformationalVersion("1.0.0")> ' Product Version

#If DEBUG Then
<Assembly: AssemblyConfiguration("Debug Build")>
#Else
<Assembly: AssemblyConfiguration("Release Build")>
#End If

I keep AssemblyInformationalVersion the same for every project within a
solution. I keep Major & Minor numbers in sync between AssemblyVersion &
AssemblyInformationalVersion, while I let VS.NET maintain the Assembly's
build & revision numbers. I increment the Product Version as I see fit,
usually when I create a release.

Unfortunately the version numbers as defined by the above attributes are not
automatically carried forward to the Setup Project, you currently need to do
that manually. I have not played enough with the VS.NET automation see how
easy it would or would not be to automate keeping the
AssemblyInformationalVersion attribute with the Setup Project's Version
property...

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top