I am trying to specify the assembly version in a .NET core (2.0) console application so I can programmatically access it via:
open System.Reflection
let main argv =
printfn "Assembly Version is: %s" <| Assembly.GetEntryAssembly().GetName().Version.ToString()
0
adding a version field to a property group of my .fsproj file e.g.:
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<Version>1.0.0.1</Version>
</PropertyGroup>
will not change the version that is printed by my test application (it stays at 0.0.0.0).
What works is adding an AssemblyInfo.fs file where is set the AssemblyVersion attribute, but if possible I would like to avoid that and use the .fsproj file. Is this possible?
I also would be happy to just have a pointer to where I can find documentation about .fsproj in general.