当我尝试添加coverlet.msbuild
到我的测试项目时,我收到此错误:
The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long. C:\my_repo\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.targets
我确实看到我的 csproj 发生了变化:
<Import Project="..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.props" Condition="Exists('..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.props')" />
<Error Condition="!Exists('..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.props'))" />
<Error Condition="!Exists('..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.targets'))" />
<Import Project="..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.targets" Condition="Exists('..\packages\coverlet.msbuild.3.1.2\build\coverlet.msbuild.targets')" />
但是对 没有任何更改packages.config
,因此看起来实际上并未安装 nuget。
我正在尝试将其添加到 .net 4.8 测试项目中。
关于可能导致这种情况的任何想法?