VS2008中的自动汇编版本号管理 [英] Automatic assembly version number management in VS2008
问题描述
我有一个用 c# 编写的 VS2008 项目,其中包含许多程序集.我想要一种简单的方法来管理所有不同程序集之间的版本号,以及一种自动增加内部版本号并将其保存到每个程序集的版本号中的方法.
I have a VS2008 project written in c# with a number of assemblies. I'd like to have a simple way of managing the version numbers between all of the different assemblies and a way to automatically increment the build number and have that saved into the version number of each assembly.
我猜这是大多数项目的问题,所以大概以前已经解决了?
I'm guessing that this is a problem with most projects so presumably it has been solved before?
对于如何简化项目版本资源的管理有什么建议吗?
Any suggestions for how I can simplify management of my project's version resources?
推荐答案
我在解决方案级别使用 .cs 文件,该文件由解决方案中的所有项目链接,其中包含以下行:
I use a .cs file on solution level that is linked by all projects in the solution which contains the following lines:
using System.Reflection;
[assembly : AssemblyVersion("1.2.3.*")]
并确保从项目中的 AssemblyInfo 文件中删除 AssemblyFileVersion
属性.
And be sure to remove the AssemblyFileVersion
attribute from the AssemblyInfo file in your project.
这篇关于VS2008中的自动汇编版本号管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!