我花了一个周末将Visual Studio 2015安装更新到Update 3。 我安装了Core .Net CLI(命令工具接口)。 并且更新" ASP.Net和WebTools工具"。
我重新开始工作,启动Visual Studio,打开我们的项目,现在我明白了:
' NuGetPackage'包没有正确加载。
问题可能是由配置更改或安装其他扩展程序引起的。您可以通过检查文件来获取更多信息:
' C:\用户\塞缪尔\应用程序数据\漫游\微软\ VisualStudio的\ 14.0 \ ActivityLog.xml'
重新启动Visual Studio可以帮助解决此问题。
继续显示此错误消息?
以下是活动日志中的错误:
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].
</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
从工具中卸载并重新安装Nuget Package Manager - &gt;扩展更新似乎已修复它。
我们会看到。在另一篇文章中有人说他们认为它有效但后来回来说并没有说: VS2015 - The 'NuGetPackage' package did not load correctly
答案 0 :(得分:2)
查看此答案:VS2015 - The 'NuGetPackage' package did not load correctly
通过扩展和更新完全删除NuGet,重新启动VS. 然后通过Extensions和Updates重新安装NuGet解决了这个问题 为了我。不需要完整的VS重新安装。
答案 1 :(得分:1)
您需要点击更新或通过扩展和更新重新安装nuGet。
Tools > Extensions and Updates Updates > Visual Studio Gallery > Nuget Package