Allen Wang

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

我一直不太清楚AssemblyInfo.cs中AssemblyVersion AssemblyFileVersion之间的区别,今天刚好在查TFS的版本号,需要查询Microsoft.TeamFoundation.dll的版本号能过属性可以看到:

不仅有我知道的两种版本号,还有另外种版号Product Version。
Assembly Version:
File Version: 8.0.50727.83
Product Version: 8.0.50727.83

在C# Project 中通常会在Assembly.cs中定义:
[assembly: AssemblyVersion("1.1.*")]
[assembly: AssemblyFileVersion("")]
[assembly: AssemblyInformationalVersion("")]  // 用来定义 Product Version

AssemblyVersion is stored in the metadata table of the assembly built. It is used to uniquely identify an assembly when referenced from other assemblies. Moreover, the CLR uses this version when binding to strongly named assemblies . AssemblyFileVersion and AssemblyInformationalVersion are informational only.

一个VS.NET插件用来管理Project Version:
Versioning Controlled Build

Auto Increment Build Numbers for C# Projects in VS.NET 2003

Managing AssemblyVersion

Using Open Source .NET Tools for Sophisticated Builds

CSDN: 自动编译,框架警察检查,文档生成,版本标注。


AssemblyVersion and Web Projects