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

后端 未结 10 1582
南方客
南方客 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:52

    I had a similar error message:

    The project was restored using Microsoft.NETCore.App version 2.0.7, but with current settings, version 2.0.0 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore

    I added the RuntimeFrameworkVersion setting to the .csproj file, and it fixed an issue for me:

    
       netcoreapp2.0
       2.0.7
    
    
    
       
    
    

提交回复
热议问题