Different version for RestSharp reference(106.10.1) in NuGet package & .Net MVC reference (105.2.3)


I have .Net MVC project using user defined NuGet package which has RestSharp version - 105.2.3, also same .Net MVC has reference to RestSharp version - 106.10.1

With this setup I am getting below error:

{"Could not load file or assembly 'RestSharp, Version=, 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)":"RestSharp, Version=, Culture=neutral, PublicKeyToken=null"}

asked on Stack Overflow May 4, 2020 by user3603110

1 Answer


I suspect you need to tell your program to use the newer version.

In my projects, I've added the following to my configs to resolve similar issues to what you're having (with Newtonsoft JSON):

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />

See this post: Assembly Binding redirect: How and Why?


answered on Stack Overflow Jun 6, 2020 by PraiseTheBaud

User contributions licensed under CC BY-SA 3.0