NuGet add reference error while installing packages

前端 未结 20 905
太阳男子
太阳男子 2020-12-09 07:27

I am not able to install any package by Nuget. For example when I want install entity framework I receive following error:

install-package EntityFramework
Su         


        
20条回答
  •  攒了一身酷
    2020-12-09 07:45

    I had this problem in Visual Studio 2017 in Windows 10.

    I had an existing project, and I updated the .Net Framework from 4.6.2 to 4.7.2, and the Entity Framework from 6.1.3 to 6.2.0. I rebuilt and deployed the application, but it failed to connect to my database because the reference to EntityFramework.SqlServer was broken.

    I used the Package Manager UI to remove the Entity Framework from both projects in my solution. I attempted to re-add the Entity Framework, but it failed every time. I had to remove the Entity Framework from both projects and save the solution to source control (TFS), and then add the Entity Framework back in.

    This successfully added the Entity Framework and the EntityFramework.SqlServer reference.

提交回复
热议问题