Remove NuGet Package manager from VS2013 - visual-studio

I had an install issue with the NuGet package manager extension. I am now trying to remove it, but each time I do the remove, I come back to VS2013 PRO and it is still there (win7 sp1 box).
Is there a different way to remove it (I am getting errors whenever I try to open a project).

I ended up calling Microsoft support, and we spent about 45 minutes searching the registry for the particular version of NuGet (there was an old version installed that was not properly removed, keeping the new one from being installed).
We had to search by version id.
VS2013 does not only put things in:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions (with a random character folder name)
But also in %appdata%\Microsoft Visual Studio 12.0\Common7\IDE\Extensions as well as other places. So we had a lot of searching to do, but once we found it and removed the folder and all the old Nuget references from the registry, it was possible to continue and install the new NUGET Package Manager.
Today I found things were corrupt, (probably registry) but a REPAIR (From the install) was able to fix the problems

Related

Confusion over NuGet in Visual Studio

Our VS2013 solutions contain a solution folder called .nuget, containing the files NuGet.config, NuGet.exe, NuGet.targets. What is the significance of this folder and what uses the files? Is it related to the "enable package restore" feature?
If I install or update a package (via the "Manage NuGet Packages" UI or package manager console), does this involve running the above NuGet.exe, or something else? VS is telling me that the NuGet Package Manager is up to date (via the Extensions and Updates dialog), however the above NuGet.exe is quite old. I've also found a very old NuGet.exe file in C:\Program Files (x86)\NuGet\. What uses the latter, and what are the implications of these exes being out of date?
The reason I ask is that we've been having problems with a couple of solutions over recent weeks. We can't update NuGet packages - the operation fails with the message "Error: An item with the same key has already been added". I'm trying to track down the cause, and wondering if these out of date NuGet.exe files might have something to do with it.
As far as I remember this folder is useless now with the latest nuget extension to Visual Studio. It was used before and was nothing but pain in the ass. I am not 100% sure about 2013, but in 2015 all works fine without it, so my suggestion is to update to the latest available nuget extension version and try to delete the folder, most likely everything will work.
Now packages go to current user folder, and use the config from %AppData%\NuGet\NuGet.config. For NuGet 2.6 or earlier, this setting was available in a project-specific .nuget\nuget.config file.
You can read more about it here.
So nuget is gradually getting better and easy to use without too much thinking of all this "magic" folders and stuff.

Visual Studio Major Issues

A few days ago now I tried to install the C++ packages for my VS2015 installation, but it wouldn't install them so I uninstalled the entirety of VS2015 and then reinstalled, but since then I've been getting tons of errors when I start the software, they are like this:
The 'Visual Studio Component Enumerator Package' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file: 'C:Users\\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'.
I've attached this log at the bottom of this post.
I get around 10 of these Package errors before I can finally load into the software, but then when I try to either open an existing C# project it says "Unavailable" or if I try to start a new C++ project it says
'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\VCWizards\default.vcxproj' cannot be opened because its project type (.vcxproj) is not supported by this version of the application. To open it, please use a version that support this type
I have tried the following to fix these issues, and every possible combination of these:
Uninstalling and reinstalling
Deleting my %appdata% in both Local and Roaming for VS 14.0
Deleting Program Files (x86)\Visual Studio 14.0
Repairing the installation
Uninstalling, cleaning registry, deleting everything I can find RE: Visual Studio and then reinstalling
devenv /setup, devenv /clearcache, devenv /uninstall /force and then reinstalling, every command line I've found anywhere.
I've been dealing with this issue for a few days and it has completely halted my development process and I'm unable to do anything with VS and it's gotten to the point where I'm extremely frustrated and not sure what to do next.
As far as I can tell there are a lot of packages missing from my installation, but Repairing my installation does not fix this. Is there a way to restore the packages?
Any assistance would be much appreciated, or is there a better forum to post this under?
Activity Log:
http://pastebin.com/pwTJQc4B

Visual Studio Online - Get Latest and NuGet

It's very possible that I'm missing something simple because I can't find others on the internet experiencing the same thing.
I'm a team that's new to the use of TFS and Visual Studio Online and we're encountering this problem:
(Using Visual Studio 2015 & 2013)
I used NuGet to add Microsoft.AspNet.WebApi.Cors to my newly created WebAPI project (ditto all other NuGet packages)
Did my work and checked in a building solution in to VSO
Co-worker did a Get Latest
His newly-retrieved project won't build and, when we expand the References, the assemblies are marked with a yellow warning icon, indicating that they're missing
We've tried (from the context of the failing project):
Update-Package
Update-Package -reinstall
Manually uninstalling and reinstalling the package in the NuGet UI
Manually adding the entire contents of the Packages directory in to TFS and doing a get latest on that directory as well
Wiping the solution out from his local file system and pulling it down clean
Copying the contents of my {Solution Directory}\Packages to a USB drive, walking it to my co-worker's computer, and copying it to his machine
Only item #6 worked but I'm CERTAIN that this cannot be the right answer.
I guarantee that this is worthy of a dope-slap but what might I be missing?
Thank you to jessehouwing for reminding me that this topic is still out here. He's exactly right on. We removed the Packages folder from source control and that resolved the problem completely.

Visual Studio + nuget + TFS: checking in nuget packages?

I'm working on a TFS project with a small team. This project has a bunch of nuget packages installed, but it's for a 4.0 project, and the nuget package manager GUI doesn't even offer the older versions of the packages any longer since their 4.5 equivalents are now being used. In order to allow other team members to compile the project, they need to have the exact versions of the packages. I'd like to check in the entire "packages" folder used by nuget. Is this a good idea? If so, how does one check in the "packages" folder and all its contents since it exists at the solution level? There is no "Include in Solution" option in Visual Studio as there is when you right-click an assembly.
in the past I have also checked in the NuGet packages into version control. With this some problems appeared:
Some packages where not checked into version control when committing from Visual Studio into TFS.
Updating packages became a real problem.
For the first problem I had used the TFS Power Tools. The problem with this solution is that every developer needed to install the Power Tools.
A better solution came up with NuGet 2.7. It introduced package restore. With package restore there's no need to check-in the packages folder. They will be restored during build.
We use an on-prem TFS install with no internet access so we have to check in our package folders or our builds fail. The biggest issue is that VS does not behave consistently when it comes to adding the pending changes for new package files, often times it will ignore the .dll files in the pending changes window, sometimes it adds everything fine.

Can't Update or Uninstall NuGet Package Manager in VS2012

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.
Running Visual Studio 2012 as the administrator...
Attempting to update the NuGet Package Manager fails, and I get this error dialog with the following at the end of the log:
2/5/2013 10:38:09 AM - Beginning to install extension to Microsoft Visual Studio Ultimate 2012...
2/5/2013 10:38:09 AM - Upgrading 'NuGet Package Manager', version 2.0.30625.9003 to version 2.2.31210.9045.
2/5/2013 10:38:10 AM - Install Error : System.IO.IOException: The process cannot access the file because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.AtomicallyDeleteFiles(IEnumerable1 filePaths, Boolean justMarkForDeletion)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.DeleteDiscoverableFiles(IInstalledExtension extension)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.UninstallInternal(IInstalledExtension extension, Boolean forceDelete)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.CommitInstalledAndUninstalledExtensions(IEnumerable1 installedExtensions, IEnumerable1 uninstalledExtensions, IEnumerable1 packComponentChanges)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.BeginInstall(IInstallableExtension installableExtension, Boolean perMachine, AsyncOperation asyncOp)
at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.InstallWorker(IInstallableExtension extension, Boolean perMachine, AsyncOperation asyncOp)
Followed by a popup telling me:
The process cannon access the file because it is being used by another process.
When I attempt to uninstall the extension first (per some solutions) I receive the same pop-up message as above, telling me the process is being used!
Steps I've made in my attempts to get this working:
I've restarted VS2012 multiple times, with and without projects loaded.
I've rebooted the computer several times and started nothing other then VS2012.
I've downloaded the NuGet installer from the web and tried to install it w/o starting VS2012 (first thing after reboot).
For step #3, I receive the same series of dialogs/errors as when attempting to update inside Visual Studio 2012.
I can't get the latest version, no matter what I try! Does anyone have another trick?
I've also noticed that NuGet is just plain not working right now. Neither the "Package Manager Console" or the "Package Manager Settings" do anything.
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:
Close all instances of Visual Studio.
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
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.)
Rename that Extensions folder to something like: C:\Program Files
(x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions_RENAMED
Download NuGet directly from the Visual Studio extension gallery.
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.
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
Open up your renamed extensions folder and move all of the non-NuGet
extensions into the new Extensions folder.
Now open Visual Studio. You should see the new version of NuGet
installed and working.
You can delete that renamed Extensions folder once you’ve verified
everything is working.
Download VSIX and right click unblock the file and install again
I'm using VS2010, I ended up fixing this problem by uninstalling NuGet Package Manager via the "Add Remove Programs", and then deleting this directory:
C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\Nuget Package Manager
I could then run the NuGet.Tools.vsix thing ok.
I have VS 2013 Pro installed. What solved this problem for me was to restart into safe mode and re-install NuGet there.
You may also want to look into Adam D's post in the link below (the add-in was blocked by anti-malware software):
Can't Update or Uninstall NuGet Package Manager in VS2012
I found a solution for this issue at -
https://kc.mcafee.com/corporate/index?page=content&id=KB85636&snspd-1015&locale=en_GB&viewlocale=en_GB
Cause:
The Microsoft Visual Studio (VS) process devenv.exe must be excluded in the EEFF/FRP process exclusion registry key.
Solution:
Users with this issue must contact Intel Security Technical Support and quote this article number for assistance with adding the devenv.exe process to the correct EEFF/FRP process exclusion registry key.

Resources