RestSharp assembly reference error

0

I have the Square Connect C# SDK nuget package that needs: RestSharp 105.1.0 or newer.

I have RestSharp 106.3.0.0

and this in my web.config

 <dependentAssembly>
    <assemblyIdentity name="RestSharp" publicKeyToken="null" culture="neutral" />
    <bindingRedirect oldVersion="100.0.0.1-106.3.0.0" newVersion="106.3.0.0" />
  </dependentAssembly> 

But I get this error...

InnerException = {"Could not load file or assembly 'RestSharp, Version=105.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"RestS...

more details

=== Pre-bind state information === LOG: DisplayName = RestSharp, Version=105.1.0.0, Culture=neutral, PublicKeyToken=null (Fully-specified) LOG: Appbase = file:///C:/GitHub/StPlatform/SimpleTixPlatformService/StPlatformWebRole/ LOG: Initial PrivatePath = C:\GitHub\StPlatform\SimpleTixPlatformService\StPlatformWebRole\bin

Calling assembly : Square.Connect, Version=2.8.0.0, Culture=neutral, PublicKeyToken=null.

LOG: This bind starts in default load context. LOG: Using application configuration file: C:\GitHub\StPlatform\SimpleTixPlatformService\StPlatformWebRole\web.config LOG: Using host configuration file: C:\Users\simpl\Documents\IISExpress\config\aspnet.config LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config. LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). LOG: Attempting download of new URL file:///C:/Users/simpl/AppData/Local/Temp/Temporary ASP.NET Files/vs/6688a414/1f994985/RestSharp.DLL. LOG: Attempting download of new URL file:///C:/Users/simpl/AppData/Local/Temp/Temporary ASP.NET Files/vs/6688a414/1f994985/RestSharp/RestSharp.DLL. LOG: Attempting download of new URL file:///C:/GitHub/StPlatform/SimpleTixPlatformService/StPlatformWebRole/bin/RestSharp.DLL. WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

asp.net
restsharp
asked on Stack Overflow Jun 24, 2018 by aron

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0