Nuget软件包未正确加载(VS 2015) [英] Nuget package didnot load correctly (VS 2015)

查看:101
本文介绍了Nuget软件包未正确加载(VS 2015)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我打开自己的Visual Studio,则会收到一条消息,内容为无法加载nuget包",请参阅activity.xml

If i open my visual Studios, I am getting a message which says "Unable to load nuget package" refer to activity.xml

这是xml中的日志:

包[NuGetPackage]的CreateInstance失败来源:"mscorlib"说明:无法加载文件或程序集" NuGet.Tools,版本= 3.4.4.1321,文化=中性,PublicKeyToken = b03f5f7f11d50a3a’.或其依赖项之一.这系统找不到文件 System.IO.FileNotFoundException:无法加载文件或程序集‘NuGet.Tools,版本= 3.4.4.1321,文化=中性,PublicKeyToken = b03f5f7f11d50a3a’或其中之一依赖关系.系统找不到文件 文件名:‘NuGet.Tools,版本= 3.4.4.1321,文化=中性,PublicKeyToken = b03f5f7f11d50a3a’ 在System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName,字符串codeBase,证据程序集安全性,运行时程序集locationHint,StackCrawlMark&stackMark,IntPtr pPrivHostBinder,布尔throwOnFileNotFound,用于自省的布尔值,布尔值rejectSecurityChecks) 在System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName,字符串codeBase,证据程序集安全性,运行时程序集locationHint,StackCrawlMark&stackMark,IntPtr pPrivHostBinder,布尔throwOnFileNotFound,用于自省的布尔值,布尔值rejectSecurityChecks) 在System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyNameassemblyRef,证据assemblySecurity,RuntimeAssembly reqAssembly,StackCrawlMark&stackMark,IntPtr pPrivHostBinder,布尔throwOnFileNotFound,用于自省的布尔值,布尔值rejectSecurityChecks) 在System.Activator.CreateInstance(String assemblyString,StringtypeName,布尔值ignoreCase,BindingFlags bindingAttr,Binder活页夹,Object [] args,CultureInfo文化,Object [] activationAttributes,证据安全信息,StackCrawlMark&stackMark) 在System.Activator.CreateInstance(String assemblyName,StringtypeName) 在System.AppDomain.CreateInstance(StringassemblyName,String typeName) WRN:程序集绑定日志记录已关闭.程序集绑定失败日志记录,设置注册表值[HKLM \ Software \ Microsoft \ Fusion!EnableLog](DWORD)到1. 注意:程序集绑定失败日志记录会带来一些性能损失.关闭功能,删除注册表值[HKLM \ Software \ Microsoft \ Fusion!EnableLog].{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}

CreateInstance failed for package [NuGetPackage]Source: 'mscorlib' Description: Could not load file or assembly 'NuGet.Tools, Version=3.4.4.1321, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.Tools, Version=3.4.4.1321, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'NuGet.Tools, Version=3.4.4.1321, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark) at System.Activator.CreateInstance(String assemblyName, String typeName) at System.AppDomain.CreateInstance(String assemblyName, String typeName) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. {5FCC8577-4FEB-4D04-AD72-D6C629B083CC}

请告诉我如何进行

推荐答案

在移至VS 2015之后,我只是遇到了完全相同的错误.我找到了一个推荐的链接:

I just had exactly the same error after moving to VS 2015. I found a link that recommended:

  1. 卸载NuGet软件包管理器工具=>扩展和更新=>已安装=>工具
  2. 在"Nuget软件包管理器"选项上单击卸载"以删除NuGet.
  3. 重新启动Visual Studio
  4. 通过扩展和更新重新安装NuGet软件包管理器

https://forums.asp.net/t/2102490.aspx?Nuget + package + didnot + load +正确+ VS + 2015 +

这对我有用,我再也没有收到错误消息.

This worked for me and I no longer get an error.

这篇关于Nuget软件包未正确加载(VS 2015)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆