C#中:如何设置组件的版本号 [英] C#: how to set version number of assembly

查看:214
本文介绍了C#中:如何设置组件的版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了使用VS2005在C#中的DLL。

I have written a DLL in C# using VS2005.

目前的DLL是显示的1.0.0.0版本号。

Currently the DLL is showing a version number of 1.0.0.0.

我如何设置这个版本号不同的东西?

How do I set this version number to something different?

推荐答案

您可以使用的 AssemblyFileVersionAttribute 直接...

You can either specify the file version using the AssemblyFileVersionAttribute directly...

指示一个编译器使用用于Win32文件
版本资源的特定
版本

Instructs a compiler to use a specific version number for the Win32 file version resource.

...或者你可以完全移除该属性这将意味着该文件版本默认的程序集的版本。这可能是很好的做法,因为有一个文件版本,是集版本不同会造成混乱。

...or you can remove this attribute entirely which will mean that the file version defaults to the assembly version. This is probably good practice as having a file version that is different to the assembly version will cause confusion.

如果该AssemblyFileVersionAttribute为
未提供,则
AssemblyVersionAttribute用于

显示的
的Windows文件属性对话框的版本选项卡上的Win32文件版本。

If the AssemblyFileVersionAttribute is not supplied, the AssemblyVersionAttribute is used for the Win32 file version that is displayed on the Version tab of the Windows file properties dialog.

您可以使用的 AssemblyVersionAttribute

大会属性通常在其他的答案中所述的AssemblyInfo.cs文件的应用。

Assembly attributes are usually applied in the AssemblyInfo.cs file as stated in the other answers.

这篇关于C#中:如何设置组件的版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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