Visual Studio 2017 cannot update Microsoft.NETCore.App package (“Blocked by project”)

前端 未结 8 1832
陌清茗
陌清茗 2020-12-08 18:22

I have a dotnet core app that is targetting Microsoft.NETCore.App 1.1.2. I created a test project to test against that project but when building I noticed this warning:

8条回答
  •  悲哀的现实
    2020-12-08 18:39

    EDIT 2018: Only follow the instructions for updating the package if you really know what you are doing. In most cases, you never need to update this package - or other packages marked as "blocked by project" - manually. A framework-dependent app will use the latest runtime available and a self-contained application will perform an extra build using a newer version of this package automatically. (there are some edge cases where you need to upgrade this package in test projects. in this case, add true and see this Q&A for other options)

    The implicit package references that the Microsoft.NET.Sdk infers can't be updated via NuGet.

    If you migrated from project.json, the project with the 1.1.0 reference likely contains

    1.1.0
    

    in the csproj file or an item like this (if you may used the package manager previously to set the version):

    
    

    Delete entries like the above and all packages will reference 1.1.2 (or whatever the installed SDK considers to be the latest) automatically. Alernatively, set RuntimeFrameworkVersion in all projects.

提交回复
热议问题