ProAnswers.org

Difference between assembly versions?

What is difference between AssemblyVersion,AssemblyFileVersion and AssemblyInformationVersion?

[b]AssemblyVersion[/b]



Where other assemblies that reference your assembly will look. If this number changes, other assemblies have to update their references to your assembly! The AssemblyVersion is required.



I use the format: major.minor. This would result in:

[assembly: AssemblyVersion(“1.0”)]

[b]AssemblyFileVersion[/b]



Used for deployment. You can increase this number for every deployment. It is used by setup programs. Use it to mark assemblies that have the same AssemblyVersion, but are generated from different builds.



In Windows, it can be viewed in the file properties.



If possible, let it be generated by MSBuild. The AssemblyFileVersion is optional. If not given, the AssemblyVersion is used.



I use the format: major.minor.revision.build, where I use revision for development stage (Alpha, Beta, RC and RTM), service packs and hot fixes. This would result in:

[assembly: AssemblyFileVersion(“1.0.3100.1242”)]

[b]AssemblyInformationalVersion[/b]



The Product version of the assembly. This is the version you would use when talking to customers or for display on your website. This version can be a string, like '1.0 Release Candidate'. Unfortunately, when you use a string, it will generate a false warning -- already [reported to Microsoft](https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=275197) (fixed in VS2010). The AssemblyInformationalVersion is optional. If not given, the AssemblyVersion is used.



I use the format: major.minor [revision as string]. This would result in:

[assembly: AssemblyInformationalVersion(“1.0 RC1”)]