My project is using Nuget package Atlassian.SDK 10.6.0. When calling
var jc = Atlassian.Jira.Jira.CreateRestClient(_jiraBaseUrl, _jiraApiUsername, _jiraApiPassword);
I have the error
System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=10.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)
My web.config already has the bindingRedirect
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0"/>
</dependentAssembly>
I also checked the fusion log
Calling assembly : Atlassian.Jira, Version=10.6.0.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: F:\Titan\AutoLedgers\Facade\web.config LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. LOG: Post-policy reference: Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed LOG: GAC Lookup was unsuccessful. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary
ASP.NET Files/facade/a6115f90/89f913a7/Newtonsoft.Json.DLL. LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/facade/a6115f90/89f913a7/Newtonsoft.Json/Newtonsoft.Json.DLL. LOG: Attempting download of new URL file:///F:/Titan/AutoLedgers/Facade/bin/Newtonsoft.Json.DLL. LOG: Assembly download was successful. Attempting setup of file: F:\Titan\AutoLedgers\Facade\bin\Newtonsoft.Json.dll LOG: Entering download cache setup phase. LOG: Assembly Name is: Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed WRN: Comparing the assembly name resulted in the mismatch: Major Version ERR: The assembly reference did not match the assembly definition found. ERR: Setup failed with hr = 0x80131040. ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.
I really have no idea how can I resolve this issue now. Does anyone has any idea?
User contributions licensed under CC BY-SA 3.0