0

I install Newtonsoft.Json.dll into wwwroot\bin. Just copied, I can do just it in this server.

I got such error.

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)

I tried to add into web.config in wwwroot.

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
            <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="11.0.2.21924"/>
        </dependentAssembly>
    </assemblyBinding>
</runtime>

Newtonsoft.Json: 11.0.2.21924 IIS: IIS8

I saw a lot of topics, when it takes reinstall for a project. But I need it for whole server.

  • I suggest to install the DLL in GAC using GAC util https://learn.microsoft.com/en-us/dotnet/framework/tools/gacutil-exe-gac-tool. Also check the dependencies of Newtonsoft and install them as well – ManishM Sep 20 '18 at 07:26
  • Possible duplicate of [The located assembly's manifest definition does not match the assembly reference](https://stackoverflow.com/questions/215026/the-located-assemblys-manifest-definition-does-not-match-the-assembly-reference) – VDWWD Sep 20 '18 at 07:30

0 Answers0