C#中:如何设置组件的版本号

编程入门 行业动态 更新时间:2024-10-27 20:38:33
本文介绍了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#中:如何设置组件的版本号

本文发布于:2023-11-04 00:33:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1556471.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本号   组件   如何设置

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!