Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

  • Thread starter Thread starter rajithagarapati4
  • Start date Start date
R

rajithagarapati4

Guest
We implemented Azure Keyvault and MSAL authentication in one of our asp.net web forms application.
Whereas MSAL is working as expected after installing all owin secirity packages and newtonsoft json package
is upgraded from 6.0.0.0 to 10.0.0 version.

But while fetching secrets from keyvault, application is encountered with following newtonsoft.json dll
missing error.
System.IO.FileLoadException: 'Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)'
FusionLog:
=== Pre-bind state information ===
LOG: DisplayName = Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
(Fully-specified)
LOG: Appbase = file:///C:/Users/v-tukar/source/repos/DWS-CPM-PLG-ETRAX-CoreCode8/Web/Microsoft.IT.eTRAx.UX/
LOG: Initial PrivatePath = C:\Users\v-tukar\source\repos\DWS-CPM-PLG-ETRAX-CoreCode8\Web\Microsoft.IT.eTRAx.UX\bin
Calling assembly : Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\v-tukar\source\repos\DWS-CPM-PLG-ETRAX-CoreCode8\Web\Microsoft.IT.eTRAx.UX\web.config
LOG: Using host configuration file: C:\Users\v-tukar\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
LOG: Attempting download of new URL file:///C:/Users/v-tukar/AppData/Local/Temp/Temporary ASP.NET Files/vs/27ddedce/76380321/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///C:/Users/v-tukar/AppData/Local/Temp/Temporary ASP.NET Files/vs/27ddedce/76380321/Newtonsoft.Json/Newtonsoft.Json.DLL.
LOG: Attempting download of new URL file:///C:/Users/v-tukar/source/repos/DWS-CPM-PLG-ETRAX-CoreCode8/Web/Microsoft.IT.eTRAx.UX/bin/Newtonsoft.Json.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Note:
1.We have upgraded all keyvault related dll's to latest version(Microsoft.Rest.ClientRuntime.Azure to Version=3.3.18 and Microsoft.Rest.ClientRuntime to 2.3.17)
2.We could see upgraded dll versions in web.config and packages.config file. Also we have checked if any other dll's in the project are dependent on Newtonsoft.Json 6.0.0.0 version dll but we could not find any.


Still we are encountering Newtonsoft.Json dll 6.0.0.0 version error. It will very helpful if anybody could suggest a solution on this


Continue reading...
 
Back
Top