In AssemblyInfo
there are two assembly versions:
(在AssemblyInfo
,有两个程序集版本:)
-
AssemblyVersion
: Specify the version of the assembly being attributed. (AssemblyVersion
:指定要赋予属性的部件的版本。)
-
AssemblyFileVersion
: Instructs a compiler to use a specific version number for the Win32 file version resource. (AssemblyFileVersion
:指示编译器对Win32文件版本资源使用特定的版本号。)
The Win32 file version is not required to be the same as the assembly's version number. (Win32文件版本不需要与程序集的版本号相同。)
I can get the Assembly Version
with the following line of code:
(我可以使用以下代码行获取Assembly Version
:)
Version version = Assembly.GetEntryAssembly().GetName().Version;
But how can I get the Assembly File Version
?
(但是,如何获取Assembly File Version
?)
ask by Enyra translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…