汇编版本的详细信息

发布于 2024-09-12 14:50:05 字数 200 浏览 6 评论 0原文

我们会在每个库中找到来自 Assembly.cs 的汇编版本。

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

我的问题是 1.0.0.0 这意味着什么?

谢谢

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

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

My question is what is 1.0.0.0 meant by this?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

隱形的亼 2024-09-19 14:50:05

如文件本身所述:

// 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")]

通过按以下方式更改:

// 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")]

您将获得最后两个部分(Build NumberRevision)的自动设置。此自动增量的工作原理如下:

  • Build Number:自 1.1.2000 以来的天数
  • Revision:自午夜以来的秒数除以二

最后但并非最不重要的一点是,如果您使用 Subversion for SourceControl您可以创建一个模板文件(具有其他名称的同一文件的副本),在所需位置替换如下内容:

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

在项目的预构建事件中,您将输入如下内容:

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

要获取当前的 Subversion修订号添加到您的应用程序的版本信息中。

As stated in the file itself:

// 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:

  • Build Number: Days since 1.1.2000
  • Revision: Seconds since midnight divided by two

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")]

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"

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

花开浅夏 2024-09-19 14:50:05

AssemblyInfo.cs 中,这四个数字的含义是:

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision

From AssemblyInfo.cs, the four numbers mean:

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
寂寞花火° 2024-09-19 14:50:05

主要版本。小版本。内部版本号。修订

major version. minor version. build number. revision

無處可尋 2024-09-19 14:50:05

版本号由四段组成;主要、次要、构建和修订。

前两段 Major 和 Minor 是用户通常会看到的版本号,Major 更改是针对非常大的更改,而 Minor 则针对用户的每个全新版本而递增。

后两个部分“构建”和“修订”是版本号的扩展,真正适合 IT 人员。默认情况下,这些是自随机指定的开始日期以来的天数,以及基于自午夜以来的秒数的修订。

我们实际上使用日期版本作为构建值,并在一天内发布版本作为修订版(尽管我们可能会将其移至 svn 修订版号)。

The version number is made up of four segments; Major, Minor, Build and Revision.

The first two segment Major and Minor are the version number that the user will normally see, major changes are for very large change, whilst minor are incremented for each brand new release to the user.

The second two segments Build and Revision are an extension to the version number that are really for IT people. By default these are the number of days since a random, designated start date, and the revision based on the number of seconds since midnight.

We actually use a version of the date for the build value and releases within a single day for the revision (although we will probably move this to being our svn revision number).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文