0
votes

I spent the weekend Updating my Visual Studio 2015 installation to Update 3. And I installed the Core .Net CLI (Command Tools Interface). And rant the update "ASP.Net and WebTools tooling".

I get back to work, start Visual Studio, open our project, and now I get this:


The 'NuGetPackage' package did not load correctly.

The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file:

'C:\Users\samuel\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml'

Restarting Visual Studio could help resolve this issue.

Continue to show this error message?


Here is the error from the Activity Log:

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.
  &#x000A;To turn this feature off, remove the registry value     [HKLM\Software\Microsoft\Fusion!EnableLog].&#x000D;&#x000A;</description>
  <guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>

Uninstalling and reinstalling Nuget Package Manager from Tools -> Extensions an Updates seems to have fixed it.

We'll see. Someone on another post said they thought it worked but then came back and said it didn't: VS2015 - The 'NuGetPackage' package did not load correctly

2
Check out the solution in here. P.s. It worked for me, too.etrupja
Should set that as the answer @eg16Hutjepower
@Hutjepower I added my comment as an answer so it is helpful for the others.etrupja

2 Answers

2
votes

Check out this answer: VS2015 - The 'NuGetPackage' package did not load correctly

Completely removing NuGet via Extensions and Updates, restarting VS then re-installing NuGet via Extensions and Updates solved the issue for me. A full VS reinstall was not necessary.

1
votes

You need to click on update or re-install the nuGet via Extensions and Updates.

Tools > Extensions and Updates Updates > Visual Studio Gallery > Nuget Package