Error using JSON.NET

I try to use JSON.NET and after including .dll and try to use one of the methods, I get this error:

Could not load file or assembly "Newtonsoft.Json.Net35, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = 30ad4fe6b2a6aeed" or one of its dependencies. The system cannot find the specified file.

Does anyone know why I could be wrong?

+3
source share
4 answers

Two things to check:

(1) , "" DLL. ZIP , .dll .exe, .zip , , . DLL Windows, "" "". , .zip , .

(2) NewSoft JSON.NET : .NET 2.0, 3.5, 4.0, Silverlight Windows Phone. . , .NET 3.5?

0

, , Json.NET, (3.5). Json.NET .

, .

0
0

, :

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
                <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.5.0.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
</configuration>

:

System.IO.FileNotFoundException

At least one module has unauthorized import

Debugging tests that require an external dll

0
source

Source: https://habr.com/ru/post/1790337/


All Articles