AssemblyVersion <> FileVersion

  • Thread starter Thread starter Michael Maes
  • Start date Start date
M

Michael Maes

Hi,

Setting the Assembly Version is no problem (<Assembly: AssemblyVersion("1.1.20043.13")>) but how do I set the FileVersion (of the dll)?

TIA,

Michael
 
Michael,
There are three "versions" you can include in your AssemblyInfo.vb file:

<Assembly: AssemblyVersion("1.0.*")> ' Assembly version
<Assembly: AssemblyInformationalVersion("1.0")> ' Product version
<Assembly: AssemblyFileVersion("1.0.*")> ' File version

If you exclude the AssemblyInformationalVersion & AssemblyFileVersion they
will default to AssemblyVersion.

For details see:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/assenamesp.asp


Hope this helps
Jay


Hi,

Setting the Assembly Version is no problem (<Assembly:
AssemblyVersion("1.1.20043.13")>) but how do I set the FileVersion (of the
dll)?

TIA,

Michael
 
The only pitty is that an "auto-increment" (.*) on the AssemblyInformationalVersion-Attribute won't work. :-(

<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyInformationalVersion("2.0")>
<Assembly: AssemblyFileVersion("2.0.0.*")>
This literally set the FileVersion to 2.0.0.* and produces a warning in the IDE (vbc : warning BC40010: Possible problem detected while building assembly 'Stegosoft.Diagnostics': The version '2.0.0.*' specified for the 'file version' is not in the normal 'major.minor.build.revision' format)

Michael
 
Michael,
I would not expect, AssemblyInformationalVersion to auto increment, as that
is the Product version! I would expect it to be a constant during rebuilds.

I would however, expect both AssemblyVersion and AssemblyFileVersion to auto
increment.

I'll check VS.NET 2005 to see if it has the same behavior, I'm not seeing
anything specific that AssemblyFileVersion should auto increment. (Only the
AssemblyVersion is documented to auto increment.)

Hope this helps
Jay

The only pitty is that an "auto-increment" (.*) on the
AssemblyInformationalVersion-Attribute won't work. :-(

<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyInformationalVersion("2.0")>
<Assembly: AssemblyFileVersion("2.0.0.*")>
This literally set the FileVersion to 2.0.0.* and produces a warning in the
IDE (vbc : warning BC40010: Possible problem detected while building
assembly 'Stegosoft.Diagnostics': The version '2.0.0.*' specified for the
'file version' is not in the normal 'major.minor.build.revision' format)

Michael
 
Hi Jay,

The desired solution I would like (in this case) is the AssemblyVersion &
AssemblyInformationalVersion to be Static and the AssemblyFileVersion to
autoincrement.
The only reason that I don't want to autoincrement the AssemblyVersion is
that these assemblies are our own Framework with also Components placed in
the ToolBox. Since the ToolBox keeps the old references when you renew a
reference, you have to remove and re-add the Components in the ToolBox. This
is a "hell of a job", especially if you're performing many builds in a short
time.

Thus I wanted the AssemblyVersion to be 'Static' and keep track of
versioning through the AssemblyFileVersion.

Maybe there's another solution for the "ToolBox-Version-Issue"?

Regards,

Michael
 
Thanks for the link Peter.
Maybe I'll "donate" the 10 bucks and look into his source-code.....

Regards,

Michael
 

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