且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP.Net Core Web API生成错误-MSB4019找不到导入的项目Microsoft.DotNet.Props.确认< Import>中的路径是否正确.

更新时间:2022-05-05 23:03:55

我遇到了类似的错误(请参阅以下问题:

I had a similar error (see this question: Swagger-codegen: error building Pet Store example for .NET Core)

对我来说,解决方法是运行dotnet migrate,该更新将项目更新为使用.csproj并将.xprojproject.json移开.

The fix for me was to run dotnet migrate which updates the project to use a .csproj and moves the .xproj and project.json out of the way.

此处的更多信息: https://docs. microsoft.com/en-us/dotnet/core/migration/#dotnet-migrate