Default assembly revision number always 0 in F# assemblies

If I specify that I want the default build and revision numbers, I put

[<assembly: AssemblyVersion("0.0.*")>]

in AssemblyInfo.fs (which I based on the sample at https://blogs.msdn.com/b/mcsuksoldev/archive/2011/06/01/f-assembly-information-file-template.aspx).

For some reason, I always end up with revision number 0 (eg 0.0.4967.0 ) in F# DLLs, while it works as advertised in C# (eg 0.0.4967.21937 ).

Default revision numbers only work when the build number is not a wildcard, 0.0.1.* .

Is this a bug or have I missed something?


This is a bug. It works as advertised in VS 2010 (F# 2.0, for which that blog was written) but is broken in VS 2012 (F# 3.0) and VS 2013 (F# 3.1, still pre-release). You should send a bug report to fsbugs@microsoft.com.

The code for F# 2.0 is down at the bottom of il.fs here. Look for parseILVersion .

Corresponding code for 3.0 is here.

The bug is in the new conditionals - they check versionComponents.Length < 4 , should probably be checking version.Revision < 0 .

链接地址: http://www.djcxy.com/p/15108.html

上一篇: 有没有一种方法来别名tmux命令?

下一篇: F#程序集中的默认程序集版本号始终为0