VB.Net - AssemblyFileVersion 和 AssemblyFileVersion 之间有什么区别? AssemblyFileVersionAttribute 和 AssemblyVersion &程序集版本属性

发布于 2024-09-06 17:18:12 字数 343 浏览 2 评论 0原文

我继承了一个 VB.Net 代码库,它是 VB 2005 并升级到 VB 2008,其中包含大约 100 个项目

我试图重新版本所有组件,但发现一些 AssemblyInfo.vb 文件具有 AssemblyFileVersion 条目,有些有 AssemblyFileVersionAttribute 条目。

此外,有些具有 AssemblyVersion 条目,有些具有 AssemblyVersionAttribute 条目。

有和没有属性有什么区别?

我应该使用哪些?

I've inherited a VB.Net codebase which was VB 2005 and upgraded to VB 2008 consisting of around 100 projects

I'm trying to re-version all of the components but have discovered some of the AssemblyInfo.vb files have an AssemblyFileVersion entry and some have an AssemblyFileVersionAttribute entry.

Also, some have an AssemblyVersion entry and some have an AssemblyVersionAttribute entry.

What is the difference between with and without Attribute?

Which ones should I be using?

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

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

发布评论

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

评论(2

哭了丶谁疼 2024-09-13 17:18:12

没有什么区别。正如 int 将解析为 System.Int32 一样,任何从 Attribute 派生的类型都会被编译器特殊对待。因此...

[MyCustom] 将解析为 [MyCustomAttribute]

相关 MSDN 条目

按照惯例,所有属性名称都以结尾
用“属性”一词来
将它们与其他项目区分开来
.NET 框架。然而,你做
不需要指定属性
在代码中使用属性时的后缀。
例如,[DllImport] 等效
到 [DllImportAttribute],但是
DllImportAttribute 是属性的
.NET Framework 中的实际名称。

There is no difference. Just as int will resolve to System.Int32, any type derived from Attribute is treated specially by the compiler. So...

[MyCustom] will resolve to [MyCustomAttribute]

Relavent MSDN Entry

By convention, all attribute names end
with the word "Attribute" to
distinguish them from other items in
the .NET Framework. However, you do
not need to specify the attribute
suffix when using attributes in code.
For example, [DllImport] is equivalent
to [DllImportAttribute], but
DllImportAttribute is the attribute's
actual name in the .NET Framework.

浅忆流年 2024-09-13 17:18:12

AssemblyFileVersionAssemblyFileVersionAttribute 等是同一件事,您可以使用其中之一。 这里是 Microsoft 在其 Connect 网站上的回复关于这个。

AssemblyFileVersion and AssemblyFileVersionAttribute etc are the same thing and you can use either one. Here's a response from Microsoft on their connect website about this.

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