# Auth0 LoginAsync complains about newtonsoft .json dll version 10.0.0.0

**URL:** <https://community.auth0.com/t/auth0-loginasync-complains-about-newtonsoft-json-dll-version-10-0-0-0/13457>\
**Category:** Get Help\
**Tags:** loginasync, login\
**Created:** [July 20, 2018, 7:07am UTC](https://community.auth0.com/t/auth0-loginasync-complains-about-newtonsoft-json-dll-version-10-0-0-0/13457 "2018-07-20T07:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohd.parwezakhtar](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mohd.parwezakhtar](https://community.auth0.com/u/mohd.parwezakhtar)\
**Post date:** [July 20, 2018, 7:07am UTC](https://community.auth0.com/t/auth0-loginasync-complains-about-newtonsoft-json-dll-version-10-0-0-0/13457/1 "2018-07-20T07:07:24Z")

</div>

I am facing a weird kind of situation while trying acheiving **LoginAsync** using **Auth0.OidcclientWpf** SDK. I am using below code:

```
private async void PerformAuthenticationAsync()
{
    Auth0Client auth0Client = new Auth0Client(new Auth0ClientOptions()
    {
         Domain = "mydomain",
         ClientId = "clientid"
    });

     var extraParameters = new Dictionary<string, string>();
     extraParameters.Add("connection", "connectionParam");
     var result = await auth0Client.LoginAsync(extraParameters: extraParameters);
}

```

After performing authentication process. I am getting error:

Not able to load **NewtonSoftJson.dll** version - **10.0.0.0**  
and the source was **Identitymodel.oidclient**. Here after setting **IdentityModelEventSource.ShowPII** to **True** I can see in the trace that the token for which I am looking for is recieved but **LoginResul** t is failed to decode the header.

I tried refering **NewtonSoft.Json** dll version **10.0.2** in my project. Now I am getting exception like:

`Not able to load NewtonSoftJson.dll version 11.0.0.0`  
and this time Browser was not even launched to enter credentials.

I am confused which version of **NewtonSoft.Json** dll I should refer? I updated my IdentityModel.oidcclient to the latest version. Even after that `IdentityModel.Oidcclient.LoginResult` is complaining for **NewtonSoft.Json** version **10.0.0.0** unavailability.

I am not sure what is the real issue. Whether I have to refer both the versions(10 & 11) and how to do that? I would appreciate if someone can help.

below is the trace I am getting -

> System.TypeInitializationException: The type initializer for ‘System.IdentityModel.Tokens.Jwt.JsonExtensions’ threw an exception. —\> 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) at System.IdentityModel.Tokens.Jwt.JsonExtensions..cctor() — End of inner exception stack trace — at System.IdentityModel.Tokens.Jwt.JsonExtensions.DeserializeJwtHeader(String jsonString) at System.IdentityModel.Tokens.Jwt.JwtSecurityToken.Decode(String tokenParts, String rawData) — End of inner exception stack trace — at System.IdentityModel.Tokens.Jwt.JwtSecurityToken.Decode(String tokenParts, String rawData) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ReadJwtToken(String token) at IdentityModel.OidcClient.IdentityTokenValidator.d\_\_4.MoveNext() \>

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [September 6, 2018, 9:28pm UTC](https://community.auth0.com/t/auth0-loginasync-complains-about-newtonsoft-json-dll-version-10-0-0-0/13457/3 "2018-09-06T21:28:39Z")

</div>

👋 @mohd.parwezakhtar were you able to solve your LoginAsync issue?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [November 5, 2018, 8:36pm UTC](https://community.auth0.com/t/auth0-loginasync-complains-about-newtonsoft-json-dll-version-10-0-0-0/13457/5 "2018-11-05T20:36:54Z")

</div>


