Build error of ASP.NET Core - “…current settings, version 2.1.0-preview3-26411-06 would be used instead”

后端 未结 10 1449
南方客
南方客 2021-02-07 20:18

I\'ve created a sample project using dotnet, but I get the following error when building the project:

error : The project was restored using Mic

10条回答
  •  余生分开走
    2021-02-07 20:57

    It seems Visual Studio is using different .NET Core versions for restore/build/publish.

    To resolve this issue, you could add TargetLatestRuntimePatch attribute in the .csproj file:

    
       netcoreapp2.0
       true
    
    

    For details, please see this page.

提交回复
热议问题