装配版本的详细信息 [英] Details of Assembly version

查看:161
本文介绍了装配版本的详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们会发现集合从Assembly.cs版本在每一个库。

we will find Assembly version from Assembly.cs in every library.

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

我的问题是什么是 1.0.0.0 这个是什么意思?

感谢

推荐答案

由于文件本身中规定:

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
//[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

通过改变这种方式如下:

By changing this the following way:

// You can specify all the values or you can default the Build and Revision Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyVersion("1.0.0.0")]
//[assembly: AssemblyFileVersion("1.0.0.0")]

您将得到一个自动设置的最后两节(内部版本号修改)。这种自动递增的工作原理如下:

You'll get an auto set of the last two sections (Build Number and Revision). And this auto-increment works as follows:

  • 内部版本号:天因为2000年1月1日
  • 修改:自午夜秒两个
  • Build Number: Days since 1.1.2000
  • Revision: Seconds since midnight divided by two

最后但并非最不重要的,如果你使用,你替换所需的地方像这样颠覆的SourceControl,您可以创建一个模板文件(同一个文件与其他人的名字复印件):

And last but not least if you use Subversion for SourceControl you can create a template file (copy of the same file with other name) where you replace on a desired place something like this:

[assembly: AssemblyVersion("1.0.$WCREV$.0")]

和你的项目的pre建事件中,你会进入这样的事情:

And within your pre-built event of your project you'll enter something like this:

SubWCRev "$(ProjectDir)\" "$(ProjectDir)Properties\AssemblyInfo.template.cs" "$(ProjectDir)Properties\AssemblyInfo.cs"

为了让您当前的Subversion版本号为您的应用程序的版本信息。

To get your current Subversion revision number into the version information of your application.

这篇关于装配版本的详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆