NuGet add reference error while installing packages

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

    Had nearly the same problem on my Windows 10 machine and could't figure out why no references worked in Visual Studio 2015 after running "Get Latest Version" in TFS and why I could not restore NuGet packages. For some reason NuGet added two packages folders to the computer and I had only deleted the package folder in the project:

    Locations:

    C:\Users\YourUser\Documents\Visual Studio 2015\Projects\YourProject\packages C:\Users\YourUser.nuget\packages

    When both of the packages folders were removed I could restore NuGet packages and everything worked again.

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

    by clearing package Cache the problem resolved:

    Tools->package Manager->Package Manager Settings-> Clear Package Cache
    
    0 讨论(0)
  • 2020-12-09 07:41

    Here is what solved it for me: VS2012 with EF6

    I found my answer here: http://richardschneider.net/blog/wordpress/?p=21

    From the VS command prompt, run the following command:

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

    After that, go to Package manager console and run the following:

    Install-Package EntityFramework -Version 6.1.3
    
    0 讨论(0)
  • 2020-12-09 07:41

    Add new Source with following path and Tick it. https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/

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

    Tools -> NuGet Package Manager -> Package Manager Settings -> go to Package Sources and remove the source that is generating the problem.

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

    I ran into the same problem. I did the following:

    update-package jQuery.
    
    Install-Package Twitter.Bootstrap -Version 3.0.0
    

    It worked , probably because the Bootstrap -version 3.0.0 work with the JQuery most recent version.

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