Ocelot: .net core 3.0 with ocelot loadtype error

Created on 25 Sep 2019  ·  11Comments  ·  Source: ThreeMammals/Ocelot

.net core 3.0 last version

ocelot not run

error:
System.TypeLoadException:“Could not load type 'Microsoft.Extensions.DependencyInjection.MvcJsonMvcCoreBuilderExtensions' from assembly 'Microsoft.AspNetCore.Mvc.Formatters.Json, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.”

startup.cs
services.AddControllers().AddNewtonsoftJson();
services.AddOcelot().AddConsul();

Most helpful comment

I also have this problem, setting up NewtonsoftJson3.0.0 is also useless

All 11 comments

See
https://github.com/ThreeMammals/Ocelot/issues/1001

this is a known problem caused by Net Core changing the default Json encoder

See

1001

this is a known problem caused by Net Core changing the default Json encoder

I set it exactly the same way, but still prompted the same error.

Microsoft.AspNetCore.Mvc.NewtonsoftJson3.0.0
Ocelot13.8.0-alpha0019

I also have this problem, setting up NewtonsoftJson3.0.0 is also useless

Try tracking #1025 for updates.

Try tracking #1025 for updates.

In other words, the .net core 3.0 still can't use ocelot now?

Hi, did we already fixed this issue yet? or do we have any plans to update to Net Core 3.0?

Currently Ocelot does not work with DotNet Core 3.0, look at #1025 for status.

Same problem

Does anyone know when the author can solve this problem?

@winlj We have pull request #1025 ready to go which should fix this issue. We'll have to wait until one of the maintainers can merge it though.

Ocelot.13.8.0.nupkg
Ocelot.Administration.13.8.0.nupkg
Ocelot.Cache.CacheManager.13.8.0.nupkg
Ocelot.Provider.Consul.13.8.0.nupkg
Ocelot.Provider.Eureka.13.8.0.nupkg
Ocelot.Provider.Kubernetes.13.8.0.nupkg
Ocelot.Provider.Polly.13.8.0.nupkg
Ocelot.Provider.Rafty.13.8.0.nupkg
Ocelot.Tracing.Butterfly.13.8.0.nupkg

Have just released these to NuGet. Should be available in 30 minutes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jefferson picture jefferson  ·  3Comments

ruimaciel picture ruimaciel  ·  3Comments

LuketaD2 picture LuketaD2  ·  3Comments

mkanakis picture mkanakis  ·  3Comments

FerAguilarR93 picture FerAguilarR93  ·  3Comments