大会版本" 0.001"成为" .1 QUOT; [英] Assembly version ".001" becomes ".1"
问题描述
在的WinForms我有一个AssemblVersion
[装配:的AssemblyVersion(01.01.01.002)]
然而,当启动画面出现时它完全忽略显示零:
1.1.1.2
因为这是非常版本因为不方便以后我会真的想有一个程序集的版本
[装配:的AssemblyVersion(01.01.01.200)]
有没有办法避免这种情况或做我必须在最后部分的开头添加一些号码版本像这样:
[装配:的AssemblyVersion(01.01.01.102)]
的的AssemblyVersion
属性存储它的信息作为 版本
对象。在版本
结构的组成部分是整数,并且对待。因此, 1.2.3.4 == 1.02.003.004
,但 1.2.3.4!= 1.2.3.400
您可以使用 AssemblyInformationalVersionAttribute
来提供你的产品aditional的,任意格式的信息,因为它的信息被存储为字符串
,而不是版本
。所以,你可以这样做:
[装配:的AssemblyVersion(1.1.1.102)]
[总成:AssemblyInformationalVersion( v.01阿尔法)]
或任何你喜欢
In WinForms I have an AssemblVersion
[assembly: AssemblyVersion("01.01.01.002")]
However when the splash screen comes up it completely ignores the zeros showing:
1.1.1.2
as the version which is very inconvenient since later I will actually want to have an assembly version
[assembly: AssemblyVersion("01.01.01.200")]
Is there a way to avoid this or do I Have to add some number at the beginning of last part of the version like so:
[assembly: AssemblyVersion("01.01.01.102")]
The AssemblyVersion
attribute stores it's information as a Version
object. The components of the Version
struct are integers, and are treated as such. So 1.2.3.4 == 1.02.003.004
but 1.2.3.4 != 1.2.3.400
You can use the AssemblyInformationalVersionAttribute
to provide aditional, arbitrarily formatted information about your product, as it's information is stored as a string
, rather than a Version
. So you can do:
[assembly: AssemblyVersion("1.1.1.102")]
[assembly: AssemblyInformationalVersion("v.01 alpha")]
Or whatever you like
这篇关于大会版本" 0.001"成为" .1 QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!