'Latest/previous ver return error "The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long."

Try to install latest ver (3.1.0) of coverlet.msuild using nuget package manager for C# Unit Test Project on VS 2019 Community. I am return the error: "The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long. C:\Users\robpi\source\repos\UnitTestProject1\packages\coverlet.msbuild.3.1.0\build\coverlet.msbuild.targets

coverlet.msbuild does not install

Note: I try to install earlier version (2.7.0) - same outcome



Solution 1:[1]

In you project file / packages file replace the value 3.1.0 by another value already present in you cache folder, save and reload your project. From there you should able to work and, eventually update the package.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Kevin Biasci