Unable to Install Any Package in Visual Studio 2015

后端 未结 19 2369
太阳男子
太阳男子 2020-12-07 13:32

I\'ve tried every package I could possibly find and none of them will install in my project. I\'ve installed every update listed in the Extensions and Updates list that wer

19条回答
  •  猫巷女王i
    2020-12-07 14:18

    In my case, This problem was caused by a mismatch in my Target framework setting under each project. When I created a new project, VS 2015 defaulted to 4.5.2, however all my nuget packages were built for 4.6.

    For some reason, VS 2015 was not showing me these errors. I didn't see them until I created a new empty project and tried to add my nuget project there. This behavior may have been aggravated because I had renamed the project a few times during the initial setup.

    I solved the problem by

    • changing the Target Framework on my projects to 4.6
    • closed VS 2015
    • deleted "packages", "obj" and "bin" folders
    • re-open the solution and try to add the nuget package again.

提交回复
热议问题