添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
有胆有识的豆腐  ·  JSON ...·  6 月前    · 
爱运动的核桃  ·  James Valley Grain, ...·  8 月前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account [VSIX]Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache. #2263 [VSIX]Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache. #2263 yyjdelete opened this issue Mar 6, 2016 · 5 comments VS2015 Update2 CTP
Nuget(VSIX) v3.4.0-rc
.Net Framework 4.7.1515.0(Win10 14279 Insider Preview x64)

Attempting to gather dependency information for package 'NLog.4.4.0-alpha3' with respect to project 'Core', targeting '.NETFramework,Version=v4.6.1'
正在尝试解析程序包“NLog.4.4.0-alpha3”的依赖项,DependencyBehavior 为“Lowest”
正在解析操作以安装程序包“NLog.4.4.0-alpha3”
已解析操作以安装程序包“NLog.4.4.0-alpha3”
已从“packages.config”中删除程序包“NLog.4.4.0-alpha1”
已从 Core 成功卸载“NLog.4.4.0-alpha1”
正在将程序包“System.Threading.Timer.4.0.1-beta-23516”添加到文件夹“F:\XXX\packages”
已将程序包“System.Threading.Timer.4.0.1-beta-23516”添加到文件夹“F:\XXX\packages”
已将程序包“System.Threading.Timer.4.0.1-beta-23516”添加到“packages.config”
已将“System.Threading.Timer 4.0.1-beta-23516”成功安装到 Core
正在将程序包“NLog.4.4.0-alpha3”添加到文件夹“F:\XXX\packages”
已将程序包“NLog.4.4.0-alpha3”添加到文件夹“F:\XXX\packages”
安装失败。正在回滚...
程序包“NLog.4.4.0-alpha3 : System.Threading.Timer [4.0.1-beta-23516, )”不存在于项目“Core”中
已从“packages.config”中删除程序包“System.Threading.Timer.4.0.1-beta-23516 : ”
程序包“NLog.4.4.0-alpha1”已存在于文件夹“F:\XXX\packages”中
已将程序包“NLog.4.4.0-alpha1”添加到“packages.config”
正在从文件夹“F:\XXX\packages”中删除程序包“NLog.4.4.0-alpha3 : System.Threading.Timer [4.0.1-beta-23516, )”
已从文件夹“F:\XXX\packages”中删除程序包“NLog.4.4.0-alpha3 : System.Threading.Timer [4.0.1-beta-23516, )”
正在从文件夹“F:\XXX\packages”中删除程序包“System.Threading.Timer.4.0.1-beta-23516 : ”
已从文件夹“F:\XXX\packages”中删除程序包“System.Threading.Timer.4.0.1-beta-23516 : ”
Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache.
========== 已完成 ==========

or powershell

PM> Update-Package NLog -ProjectName Core -Pre
Attempting to gather dependency information for multiple packages with respect to project 'Core', targeting '.NETFramework,Version=v4.6.1'
Attempting to resolve dependencies for multiple packages.
正在解析操作以安装多个程序包
已从packages.config中删除程序包NLog 4.4.0-alpha1
已从 Core 成功卸载NLog 4.4.0-alpha1
程序包System.Threading.Timer.4.0.1-beta-23516已存在于文件夹F:\XXX\packages中
已将程序包System.Threading.Timer.4.0.1-beta-23516添加到packages.config
已将System.Threading.Timer 4.0.1-beta-23516成功安装到 Core
程序包NLog.4.4.0-alpha3已存在于文件夹F:\XXX\packages中
安装失败。正在回滚...
程序包NLog 4.4.0-alpha3不存在于项目Core中
已从packages.config中删除程序包System.Threading.Timer 4.0.1-beta-23516
程序包NLog 4.4.0-alpha1已存在于文件夹F:\XXX\packages中
已将程序包NLog 4.4.0-alpha1添加到packages.config
Update-Package : Failed to add reference to 'System.Runtime'. Please make sure that it is in the Global Assembly Cache.
所在位置 行:1 字符: 1
+ Update-Package NLog -ProjectName Core -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand

While the standalone version of Nuget works well.
Nuget(exe) v3.4.0-rc

F:\XXX\Core>"nuget (3).exe" update packages.config -Pre
MSBuild auto-detection: using msbuild version '14.0' from 'C:\Program Files (x86)\MSBuild\14.0\bin'.
Feeds used:
  http://api.nuget.org/v3/index.json
  http://www.myget.org/F/aspnetvnext/api/v3/index.json
Attempting to gather dependency information for multiple packages with respect to project 'F:\XXX\Core\Core.csproj', targeting '.NETFramework,Version=v4.6.1'
Attempting to resolve dependencies for multiple packages.
Resolving actions install multiple packages
Removed package 'NLog 4.4.0-alpha1' from 'packages.config'
Successfully uninstalled 'NLog 4.4.0-alpha1' from Core.csproj
For adding package 'System.Threading.Timer.4.0.1-beta-23516' to project 'Core.csproj' that targets 'net461'.
For adding package 'System.Threading.Timer.4.0.1-beta-23516' to project 'Core.csproj' that targets 'net461'.
Adding package 'System.Threading.Timer.4.0.1-beta-23516' to folder 'F:\XXX\packag
Added package 'System.Threading.Timer.4.0.1-beta-23516' to folder 'F:\XXX\package
Added package 'System.Threading.Timer.4.0.1-beta-23516' to 'packages.config'
Successfully installed 'System.Threading.Timer 4.0.1-beta-23516' to Core.csproj
For adding package 'NLog.4.4.0-alpha3' to project 'Core.csproj' that targets 'net461'.
For adding package 'NLog.4.4.0-alpha3' to project 'Core.csproj' that targets 'net461'.
Adding package 'NLog.4.4.0-alpha3' to folder 'F:\XXX\packages'
Added package 'NLog.4.4.0-alpha3' to folder 'F:\XXX\packages'
Added package 'NLog.4.4.0-alpha3' to 'packages.config'
Successfully installed 'NLog 4.4.0-alpha3' to Core.csproj
          

Ok, I think there is a dup for this somewhere, system.runtime is not a framework assembly so the call to add the reference fails. The workaround is to add it manually first.

@ericstj