0

I tried to update a few packages using Package Manager Console, but I am getting this:

update-package : Failed to add reference to 'EntityFramework'.
At line:1 char:1
+ update-package EntityFramework -reinstall
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

Here are a few commands that I tried:

Install-Package EntityFramework
Update-Package EntityFramework -Reinstall
Update-Package -Reinstall

I also tried to update packages using UI and ran VS in administrator mode. Important to mention, the project is under TFS source control (I did make it work when I removed TFS binding). There are a few other packages - same thing with them. I see yellow exclamation next to references and I can't re-install packages.

I've never seen this error before, similar question answers don't work for me.

2 Answers 2

3

In my case packages where checked in TFS source control (which is of course terrible). This answer explains how to setup ignore rules for TFS. After deleting packages everything was fixed.

Sign up to request clarification or add additional context in comments.

Comments

0

I've tried your commands on one of my project that under VSTS source control, no issue occurred (VS 2015.3 + Package Manager Console Host Version 3.5.0.1484). You may try the items below:

  1. Check Package Manager Console version to see whether it is the latest version.

  2. Try to open the package from Manage Nuget Packages, uninstall the EntityFramework package and re-install it:

    enter image description here

  3. Enable Package restore in VS:

    enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.