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
Herfried K. Wagner [MVP] - 31 Oct 2004 20:18 GMT
"Matthew" <turn.deletethis@alltel.net> schrieb:
>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.

Signature
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/
Jay B. Harlow [MVP - Outlook] - 31 Oct 2004 20:56 GMT
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
>I found a piece of code that I can use to control the version of my
>software:
[quoted text clipped - 7 lines]
>
> Matthew