我需要升级一个Visual Studio 2019项目,它是xproj类型。当我尝试打开解决方案时,它说需要升级,但然后我收到以下信息:
xproj项目文件不再受支持。有关迁移到csproj的详细信息,请参见https://learn.microsoft.com/en-us/dotnet/core/migration/。
链接的文档提到可以在Visual Studio中完成(无法实现)或使用dotnet migrate。当我尝试时,我得到以下提示:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-migrate does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
进一步了解后发现,在dotnetcore 3.0中已经弃用了dotnet migrate命令。
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-migrate
此命令已被弃用。从.NET Core 3.0 SDK开始,dotnet migrate命令不再可用。它只能将Preview 2 .NET Core项目迁移到1.x .NET Core项目,而这已经不再得到支持。
我在Visual Studio 2017和2015的命令行上都尝试过,并获得了完全相同的错误信息。看来安装dotnetcore3会导致无法使用该命令。
是否有任何方法可以在没有访问推荐的Microsoft工具的情况下迁移项目?