Home
Options

Using a query that references Microsoft.AspNetCore.Http.Json.JsonOptions, getting TypeLoadException

I can't seem to get my query working.

I'm trying to load up a dbcontext which has a dependency on Microsoft.AspNetCore.Http.Json.JsonOptions in a c# program

As far as i'm aware it should be looking in Microsoft.AspNetCore.Http v8 however the error i'm getting is: Could not load type 'Microsoft.AspNetCore.Http.Json.JsonOptions' from assembly 'Microsoft.AspNetCore.Http.Extensions, Version=2.2.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

I'm running linqpad 8, and I've tried clearing out my nuget cache.

Comments

  • Options

    Press F4 - ensure that you have checked "Reference ASP.NET Core" in the bottom right.

    Also, make sure that you are using the latest NuGet package versions. Remove or update any old references. If it's still a problem, press F4 and under 'Advanced', click Show Assembly Resolution Log. That will include an NuGet assembly resolution log that will show you where the assemblies are coming from. Post this log if you are unable to resolve it yourself.

Sign In or Register to comment.