Auto-increment AssemblyFileVersion?

D

David Veeneman

I am using the "1.0.*" pattern to auto-increment the AssemblyVersion
attribute of my project's assembly. I'd like to have the assembly's
AssemblyFileVersion attribute match this value, so that I can see the
assembly version in the Windows XP Explorer. In other words, I'd like to
synchronize the file version of an assembly to its assembly version. I've
discovered that the "1.0.*" pattern doesn't work for the AssemblyFileVersion
attribute.

-- Can the AssemblyFileVersion attribute be d to the AssemblyVersion
attribute ? If so, how?

-- Is there any reason why it would be a bad idea to do this?

Thanks in advance.
 
A

Alan Pretre

David Veeneman said:
I am using the "1.0.*" pattern to auto-increment the AssemblyVersion
attribute of my project's assembly. I'd like to have the assembly's
AssemblyFileVersion attribute match this value, so that I can see the
assembly version in the Windows XP Explorer. In other words, I'd like to
synchronize the file version of an assembly to its assembly version. I've
discovered that the "1.0.*" pattern doesn't work for the
AssemblyFileVersion attribute.

In your AssemblyInfo.cs file, just comment out the AssemblyFileVersion()
attribute, like so:

[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
-- Is there any reason why it would be a bad idea to do this?

No. If you want more control over versioning though, see this VS addin.

http://www.codeproject.com/dotnet/versioningcontrolledbuild.asp

-- Alan
 

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

Top