Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using coverlet with. Net Framework generates an error: The expression "[System.Version]::Parse('')" canot be evaluated

I wrote a very simple C# .Net Framework application and added some unit tests. Now, trying to check the coverage using coverlet. Getting error MSB4184.

The expression "[System.Version]::Parse('')" canot be evaluated. Version string portion was too short or too long. (parameter 'input' ).

Does anyone encounter such an error?

like image 783
Anel Avatar asked Apr 27 '26 04:04

Anel


1 Answers

One way I got around this issue was by renaming (or deleting) the coverlet.collector directory in your $HOME\.nuget\packages directory. Close Visual Studio completely, then re-open your solution or project.

File Explorer with renamed coverlet.collector directory

like image 138
Edward J. Stembler Avatar answered Apr 28 '26 18:04

Edward J. Stembler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!