NuGet package shows yellow exclamation mark

2019-06-15 06:58发布

I just installed a package through NuGet, but it shows a yellow exclamation mark icon in my Solution Explorer, see screenshot below.

Why does this happen, and how can I resolve it?

enter image description here

2条回答
The star\"
2楼-- · 2019-06-15 07:43

Many times it is just that Visual Studio is out of sync. Closing the solution and re-opening will magically fix these errors in many cases. It's easy enough that it should be one of the first things you try.

查看更多
We Are One
3楼-- · 2019-06-15 07:51

In my case I had to manually update targetFramework in packages.config where "problematic" nuget was referenced.

My steps:

  1. I checked the path where NuGet is installed
  2. I searched config where the NuGet is referenced within the solution
  3. I manually changed targetFramework according the last segment/directory of NuGet's installation path
    my screenshot
查看更多
登录 后发表回答