Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 (e.g. 0.0.4967.0) in F# DLLs, while it works as advertised in C# (e.g. 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?

like image 914
John Reynolds Avatar asked Aug 08 '13 11:08

John Reynolds


1 Answers

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 [email protected].

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.

like image 58
latkin Avatar answered Oct 11 '22 03:10

latkin