VB.Net - What is the difference between AssemblyFileVersion and AssemblyFileVersionAttribute and AssemblyVersion & AssemblyVersionAttribute

I inherited the VB.Net codebase, which was VB 2005 and upgraded to VB 2008 consisting of 100 projects

I try to reinstall all the components, but I find that some AssemblyInfo.vb files have an AssemblyFileVersion entry and some have an AssemblyFileVersionAttribute entry.

In addition, some have an AssemblyVersion entry, and some have an AssemblyVersionAttribute entry.

What is the difference between and without Attribute ?

Which ones should I use?

+4
source share
2 answers

There is no difference. Just as int will be allowed by System.Int32 , any type obtained from Attribute is handled specially by the compiler. So that...

[MyCustom] allow [MyCustomAttribute]

Relavent MSDN Entry

By convention, all attribute names end with the word β€œAttribute” to distinguish them from other objects in the .NET Framework. However, you do not need to specify an attribute suffix when using attributes in code. For example, [DllImport] is equivalent in [DllImportAttribute], but DllImportAttribute is an attribute attribute of the actual name attribute in the .NET Framework.

+7
source

AssemblyFileVersion and AssemblyFileVersionAttribute etc. - the same thing, and you can use one of them. Here's a response from Microsoft on their website about this.

+4
source

Source: https://habr.com/ru/post/1313751/


All Articles