Visual Studio 2010 failing to uninstall extensions

So, I finally decided to update my Nuget Package manager to the latest version (2.0) today. I loaded up the extension manager and clicked the uninstall button. Nothing ….

After bit of google-fu and I found this stackoverflow answer. Which then produced an error message in the log file …

01/08/2012 11:24:39 – Uninstalling ‘NuGet Package Manager’, version 1.8.30524.9000.
01/08/2012 11:24:39 – System.IO.IOException: Cannot create a file when that file already exists.

at Microsoft.VisualStudio.ExtensionManager.ExtensionManagerService.Uninstall(IInstalledExtension extension)
at VSIXInstaller.App.UninstallExtensionFromSKU(String vsixID, SupportedVSSKU sku)

Some more google-fu and I came across this answer on the microsoft forums. Which basically describes how to remove a couple of files in order to allow the extension to be removed. So, I fired up powershell (it could just as easily be done in a standard command prompt) and ran the following commands …

cd “C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDEExtensionsMicrosoft CorporationNuGet Package Manager1.8.30524.9000”

Remove-Item *.deleteme


I then re-ran the vsixinstaller (via the Visual Studio Command Prompt)

c:Program Files (x86)Microsoft Visual Studio 10.0VC>vsixinstaller.exe /uninstall:NuPackToolsVsix.Microsoft.67e54e40-0ae3-42c5-a949-fddf5739e7a5

and the extension is gone. So I’m now going to reinstall it.


Those “ghost” deleteme files may also explain why I went through a spell recently of the extension uninstalling itself every time I loaded up visual studio!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s