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:
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/23/2012 9:45:26 PM - VWDExpress
3/23/2012 9:45:26 PM - VPDExpress
3/23/2012 9:45:26 PM -
3/23/2012 9:45:26 PM - Supported Isolated Shells :
3/23/2012 9:45:26 PM -
3/23/2012 9:45:26 PM - References :
3/23/2012 9:45:26 PM -
3/23/2012 9:45:26 PM - System.IO.DirectoryNotFoundException: The system cannot find the path specified. (Exception from HRESULT: 0x80070003)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.Settings.ExternalSettingsManager.GetScopePaths(String applicationPath, String suffixOrName, 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 VSIXInstaller.App.OnStartup(StartupEventArgs e)
NuGet creates a subfolder for each package identifier, then creates subfolders for each installed version of the package. NuGet installs package dependencies as required. This process might update package versions in the process, as described in Dependency Resolution.
NuGet 3.5 and earlier uses packages-cache instead of the http-cache, which is located in %localappdata%\NuGet\Cache . By using the cache and global-packages folders, NuGet generally avoids downloading packages that already exist on the computer, improving the performance of install, update, and restore operations.
Simply copy existing packages. config file to your new project. Include this file into the project. Then follow to Package Manager Console and execute Update-Package -reinstall command.
Starting in Visual Studio 2017, NuGet and the NuGet Package Manager install automatically when you create any .NET-related workloads in Visual Studio. You can also install the Package Manager by selecting Individual components > Code tools > NuGet package manager in the Visual Studio Installer.
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):
HKEY_CURRENT-USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\
Personal
key will show the shared folder as its valueC:\Temp\
regedit
as you'll be changing it back in a moment Personal
registry value back to its previous stateI don't tested this myself, but you can try to modify C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config
file and include loadFromRemoteSources element:
<loadFromRemoteSources enabled="true"/>
at the location <configuration>
\ <runtime>
. Additionally you can try to verify that no other old version NuGet is installed. You should start Visual Studio 2010 shortcut with context menu and choose "Run as administrator" to be sure that you can uninstall it.
Additionally you can consider to add "FullTrust" to the share for the .NET
CasPol.exe -m -ag 1.2 -url file://ServerName/ShareName/* FullTrust
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With