Alex Rivera | Logout

Can i install / use nuget if my documents folder is on a shared drive?

Asked 2012-03-24T12:04:34.907
8

I see a number of issues on the nuget forum around not being able to install if your My documents folder is on a shared drive. If I don't have the flexibility to change this (locked down policy) is there any way i can use nuget?

Here is the error i get when trying to install it from the VS Extension Manager:

The system cannot find the path specified. (Exception from HRESULT:

enter image description here

The VS log file shows:

3/23/2012 9:45:26 PM - Microsoft Visual Studio Extension Installer
3/23/2012 9:45:26 PM - -------------------------------------------
3/23/2012 9:45:26 PM - Initializing Install...
3/23/2012 9:45:26 PM - Extension Details...
3/23/2012 9:45:26 PM -  Identifier      : NuPackToolsVsix.Microsoft.67e54e40-0ae3-42c5-a949-fddf5739e7a5
3/23/2012 9:45:26 PM -  Name            : NuGet Package Manager
3/23/2012 9:45:26 PM -  Author          : Microsoft Corporation
3/23/2012 9:45:26 PM -  Version         : 1.6.21215.9133
3/23/2012 9:45:26 PM -  Description     : A collection of tools to automate the process of downloading, installing, upgrading, configuring, and removing packages from a VS Project.
3/23/2012 9:45:26 PM -  Locale          : en-US
3/23/2012 9:45:26 PM -  MoreInfoURL     : http://docs.nuget.org/
3/23/2012 9:45:26 PM -  InstalledByMSI  : False
3/23/2012 9:45:26 PM -  MinFramework    : 4.0
3/23/2012 9:45:26 PM -  MaxFramework    : 4.0
3/23/2012 9:45:26 PM - 
3/23/2012 9:45:26 PM -  Supported Visual Studio Editions : 
3/23/2012 9:45:26 PM -      Version : 10.0
3/23/2012 9:45:26 PM -          Pro
3/23/2012 9:45:26 PM -          IntegratedShell
3/23/2012 9:45:26 PM -          VWDExpress
3/23/2012 9:45:26 PM -          VPDExpress
3/23/2012 9:45:26 PM -      Version : 11.0
3/23/2012 9:45:26 PM -          Pro
3/23/2012 9:45:26 PM -          IntegratedShell
3/
Edit
Report

2 Answers

10

I was facing a similar issue and the various suggestions about CasPol and loadFromRemoteSources failed; here's what worked for me (on Windows 7 sp1):

  1. Uninstall the current NuGet extension
  2. Close Visual Studio
  3. Open up a registry editor and navigate to HKEY_CURRENT-USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\
    • The Personal key will show the shared folder as its value
  4. Amend that value to a local drive location, e.g. C:\Temp\
    • Don't close regedit as you'll be changing it back in a moment
  5. Open Visual Studio
    • it might complain about not finding certain settings, but I just clicked through the warnings
  6. Install the NuGet extension
    • at least for me, this all happened smoothly in exactly the way that wasn't happening before
  7. Quit Visual Studio
  8. Revert the Personal registry value back to its previous state
  9. Restart Visual Studio
    • ... et voilà!
answered 2012-10-26T09:02:54.543
2

Try to set your Environment Variable Path in the MyComputer's System Properties > Advance tab

answered 2012-07-06T11:54:01.050

Your Answer