Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error In Azure: Could not load file or assembly NuGet.Core

Could not load file or assembly 'NuGet.Core, Version=1.6.30117.9648, Culture=neutral,  
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's  
manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

How Could I solve this problem? And.Next Text Error:

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].

From the stack Trace:

[FileLoadException: Could not load file or assembly 'NuGet.Core,   
Version=1.6.30117.9648, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of  
its dependencies. The located assembly's manifest definition does not match the  
assembly reference. (Exception from HRESULT: 0x80131040)]

This is my first project in Azure. I have no idea what to do. Thank you for your consideration!

UPD: It seems Like I have mismathes in my project.. For instance in Error: "NuGet.Core, Version=1.6" In my programm's referances it is Version=2.6 and in "packages.config" the same 2.6 version. Where could I change this error?

like image 873
Roman Ukr Avatar asked Oct 04 '22 06:10

Roman Ukr


1 Answers

This looks less like an Azure problem and more like a Visual Studio problem. If you have a project with NuGet referenced, remove it. NuGet should be integrated into VS and not into your project. Then update your version of NuGet.

In Visual Studio 2012:

Tools -> Library Package Manager -> Package Manager Settings -> Package Manager -> Package Sources and click Update.

The source would be https://nuget.org/api/v2/

like image 187
crthompson Avatar answered Oct 13 '22 12:10

crthompson