try-convert -w Test.csproj --target-framework netstandard2.0
结果如下:
Multiple installs of MSBuild detected please select one:
...
Instance 6
Name: .NET Core SDK
Version: 3.0.100
MSBuild Path: C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\
但是指定其中一条路径
try-convert -w Test.csproj --target-framework netstandard2.0 -m "C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\"
结果如下:
例外情况
System.ArgumentException: Directory "C:\Program Files\dotnet\sdk\3.0.100-preview7-012821"" does not exist (Parameter 'msbuildSearchPaths')
A directory or directories in "msbuildSearchPaths" do not exist
发布于 2021-06-28 16:35:03
从MSBuild路径中删除尾部斜杠:
try-convert -w Test.csproj --target-framework netstandard2.0 -m "C:\Program Files\dotnet\sdk\3.0.100-preview7-012821"
https://stackoverflow.com/questions/68160126
复制相似问题