NETSDK1061: The project was restored using Microsoft.NETCore.App version 1.0.0, but with current settings, version 2.0.9 would be used instead

后端 未结 10 1579
清酒与你
清酒与你 2020-12-15 04:31

I\'m developing a mobile app and using MS App Center for CI. Yesterday the Unit Test project failed to build in App Center with the following error. I couldn\'t recreate the

10条回答
  •  一向
    一向 (楼主)
    2020-12-15 05:01

    If you use Azure DevOps, don't edit project file. Use "dotnet restore"(https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops) instead of Nuget restore:

    Replace this:

    - task: NuGetCommand@2
      inputs:
        restoreSolution: '$(solution)'
    

    With this:

    - script: dotnet restore
    

提交回复
热议问题