Can't install Nuget or other extension to VS2012 on Win8

1

When I try to install any extension for visual studio ultimate 2012 on my new installation of Winodws 8 I get this exception :

System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.VisualStudio.Settings.ExternalSettingsManager.GetScopePaths(String applicationPath, String suffixOrName, String vsVersion, Boolean isLogged, Boolean isForIsolatedApplication) at Microsoft.VisualStudio.Settings.ExternalSettingsManager.CreateForApplication(String applicationPath) at VSIXInstaller.App.GetExtensionManager(SupportedVSSKU sku) at VSIXInstaller.App.GetExtensionManagerForApplicableSKU(SupportedVSSKU supportedSKU, IInstallableExtension installableExtension, List`1 applicableSKUs) at VSIXInstaller.App.InitializeInstall() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute()

I tryed to repair VS, did not work, and also try to uninstall/install and got the same problem. Anybody as an idea?

windows-8
visual-studio-2012
asked on Super User Nov 3, 2012 by VinnyG

1 Answer

1

I was stumped by this until I realized that I had somehow deleted my My Documents directory. Recreating C:\Users\<username>\Documents allowed it to install.

Others have reported the same bug when My Documents has been remapped to a different location. The workaround is to map it back to the standard location, install the vsix, and reestore your mapping.

If all else fails, you can manually unpack the extension:

  • In Visual Studio, go to Tools > Extensions and Updates, and install a working extension from the online repository (I used "Microsoft Visual Studio 2012 Feedback Tool"). For some reason, this is needed to get new extensions you manually unpack to show up in VS.
  • Close Visual Studio.
  • Unpack the .vsix file as a subdirectory of the Visual Studio extensions directory C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\11\Extensions\, alongside the extension you installed (I used 7-zip).
  • Re-open Visual Studio. Under Extensions and Updates, the new extension showed up but was marked disabled. Enable it and restart VS.
answered on Super User Dec 11, 2013 by Mechanical snail

User contributions licensed under CC BY-SA 3.0