haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

--version doesn't seem to work #268

Closed 0x53A closed 5 years ago

0x53A commented 5 years ago

This is the output I get when calling Expecto from Fake:

Starting target 'RunTests'
Starting task 'Expecto': Tests.exe
Tests.exe --parallel-workers 0 --fail-on-focused-tests --sequenced --version 
EXPECTO version 

[17:11:10 INF] EXPECTO? Running tests... <Expecto>

Note how it just prints EXPECTO version

~Unrelated question:~

~what is the INF in [17:11:10 INF] EXPECTO? Running tests... <Expecto>?~
(Apparently it stands for Informational, the log level. I thought at first it was some floating point issue (INFINITY) ;D)

Edit:

    let expectoVersion() =
      let assembly = typeof<ExpectoConfig>.GetTypeInfo().Assembly
      let fileInfoVersion = FileVersionInfo.GetVersionInfo assembly.Location
      fileInfoVersion.ProductVersion

Executing the code in fsi, ProductVersion is empty.

Edit2:

Afaik FileInfoVersion gets its information from here:

grafik

Should the code be changed to instead read the assembly version?

Edit3:

If I do a local build, the information is correct:

grafik

Could this be either a linux issue, or an issue with an older dotnet sdk? I have 2.1.301

haf commented 5 years ago

This is most likely a build issue; what nuget version are you using?

0x53A commented 5 years ago

I checked [6.0 ; 8.1.1] and they all have an empty product version