NuGet add reference error while installing packages

前端 未结 20 895
太阳男子
太阳男子 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:54

    Running this command from an elevated prompt resolved my issue:

    regsvr32 "C:\Program Files (x86)\Common Files\microsoft shared\MSEnv\VsLangproj.olb"

    Source: https://docs.nuget.org/Release-Notes/Known-Issues

    0 讨论(0)
  • 2020-12-09 07:56

    In my case, deleting all occurrences of 'EntityFramework...' files in the Bin folder (open the folder in Windows Explorer) worked form me. I didn't have the packages folder in my project. The 'EntityFramework...' files were added by different action.

    NOTE: You may need to rebuild project to remove error(s).

    0 讨论(0)
  • 2020-12-09 07:57

    When I went to Visual Studio 2015 Update 3, it broke for me, I tried many of the steps, in other answers to clear package folders / caches / etc.

    In the end I got it working via:

    • Full uninstall.
    • Went looking for all files/locations of visual studio (AppData/Documents/etc).
    • New re-install, it still didn't work (I had missed files in other locations).
    • Ran devenv commands : like /resetuserdata and /resetsettings
    • Ran a repair action.

    So just note doing a full uninstall won't clear out all your settings/cache data.

    0 讨论(0)
  • 2020-12-09 08:00

    I ran into this issue as well. Unfortunately, the only solution that worked for me was completely uninstalling Visual Studio, deleting any folders left over after the uninstall, rebooting computer, and then re-installing Visual Studio.

    Visual Studio 'repair' did not work for me. Only complete re-install.

    0 讨论(0)
  • 2020-12-09 08:04

    For me, the problem was fixed with git clean -dfx.

    0 讨论(0)
  • 2020-12-09 08:05

    The problem occurred in my entity framework version. I was using an older version of entity framework, After deleting older version of EF and re installing it with the latest version available helped me solving this issue.

    0 讨论(0)
提交回复
热议问题