Can't Update or Uninstall NuGet Package Manager in VS2012

后端 未结 4 1164
一个人的身影
一个人的身影 2020-12-12 20:41

I am unable to update or uninstall the NuGet Package Manager for Visual Studio 2012. I\'ve looked around to several solutions, but have not found one that works.

Ru

4条回答
  •  悲哀的现实
    2020-12-12 21:04

    Source:

    • http://www.paraesthesia.com/archive/2013/07/30/upgrading-nuget-the-process-cannot-access-the-file-because-it.aspx

    This is what helped me:

    1. Close all instances of Visual Studio.
    2. Go to your global Visual Studio extensions folder. NuGet doesn’t install in your per-user folder; instead, you’ll see it in Program Files. Something like: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions
    3. Look in that folder. You will see a lot of randomly named folders like “sdjfksiov.djd” and so on. Most (if not all) of those are NuGet. You’ll want to be aware of which ones are NuGet and which ones aren’t, particularly if you have other extensions installed. (You can tell if it's NuGet because it'll have a bunch of NuGet.*.dll files in there. If you don't see NuGet stuff in there, you'll want to keep it.)
    4. Rename that Extensions folder to something like: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions_RENAMED
    5. Download NuGet directly from the Visual Studio extension gallery.
    6. Execute the downloaded NuGet.Tools.vsix file you just downloaded. Don’t do it through Visual Studio. Just double-click the .vsix file to install it.
    7. NuGet should successfully install. As part of that install, it will create the Extensions folder again, so you will once again see C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions
    8. Open up your renamed extensions folder and move all of the non-NuGet extensions into the new Extensions folder.
    9. Now open Visual Studio. You should see the new version of NuGet installed and working.
    10. You can delete that renamed Extensions folder once you’ve verified everything is working.
    11. Download VSIX and right click unblock the file and install again

提交回复
热议问题