visual-studio-2010 - 如果我的文档文件夹在共享驱动器上,我可以安装/使用 nuget 吗?

标签 visual-studio-2010 nuget

我看到一个 number of issues如果您的“我的文档”文件夹位于共享驱动器上,则无法安装在 nuget 论坛上。如果我没有改变这个(锁定政策)的灵活性,我有什么办法可以使用 nuget 吗?

这是我尝试从 VS 扩展管理器安装时遇到的错误:

该系统找不到指定的路径。 (来自 HRESULT 的异常(exception):

enter image description here

VS 日志文件显示:

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)

最佳答案

我面临着类似的问题以及关于 CasPol 的各种建议。和 loadFromRemoteSources失败的;这对我有用(在 Windows 7 sp1 上):

  • 卸载当前的 NuGet 扩展
  • 关闭 Visual Studio
  • 打开注册表编辑器并导航至 HKEY_CURRENT-USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\
  • Personal键将显示共享文件夹为其值
  • 将该值修改为本地驱动器位置,例如C:\Temp\
  • 不要关闭regedit因为您稍后将把它改回来
  • 打开 Visual Studio
  • 它可能会提示找不到某些设置,但我只是点击了警告
  • 安装 NuGet 扩展
  • 至少对我来说,这一切都以前所未有的方式顺利发生
  • 退出 Visual Studio
  • 恢复 Personal注册表值恢复到以前的状态
  • 重新启动 Visual Studio
  • ……等等!
  • 关于visual-studio-2010 - 如果我的文档文件夹在共享驱动器上,我可以安装/使用 nuget 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9851580/

    相关文章:

    projects-and-solutions - NuGet 和多种解决方案

    nuget - 为什么 NuGet.exe 包忽略 Configuration=Release 参数?

    linux - 将 Tweetinvi 添加到没有 nuget 的单声道

    c# - 将 .exe 项目转换为类库

    c++ - 在非联网计算机之间复制 Visual Studio C++ 项目

    vb.net - Visual Studio 没有选项可以在调试和发布之间进行选择

    c++ - Visual Studio 2010 和 win7 64 位上的 Qt

    java - Visual Studio 代码调试器 (Java)

    mono - 如何在Mono 2.10.9上运行NuGet?

    visual-studio - 在没有 NuGet 的情况下在 Visual Studio 上安装测试运行器