Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting netcoreapp3.0/netstandard2.1? #980

Closed
saber-wang opened this issue Aug 6, 2019 · 5 comments
Closed

Supporting netcoreapp3.0/netstandard2.1? #980

saber-wang opened this issue Aug 6, 2019 · 5 comments

Comments

@saber-wang
Copy link

Unhandled exception. 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'.
at Ocelot.DependencyInjection.OcelotBuilder..ctor(IServiceCollection services, IConfiguration configurationRoot)
at Ocelot.DependencyInjection.ServiceCollectionExtensions.AddOcelot(IServiceCollection services, IConfiguration configuration)
at netcore.Gateway.Startup.ConfigureServices(IServiceCollection services) in D:\NET\xfCore\netcore.Gateway\netcore.Gateway\Startup.cs:line 66
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass9_0.g__Startup|0(IServiceCollection serviceCollection)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.b__0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.b__0(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()

@saber-wang saber-wang changed the title 支持 netcoreapp3.0/netstandard2.1? Supporting netcoreapp3.0/netstandard2.1? Aug 6, 2019
@thangchung
Copy link

I have got the same issue. I used Ocelot v13.8.0-alpha0010 with .NET Core netcoreapp3.0 template and .NET SDK v3.0.100-preview7-012821 on my machine. @TomPallister Could you tell us how to work-around or fix it?

@thangchung
Copy link

I have found the issue is because of .NET Core 3.x used the new json lib. The same issue at domaindrivendev/Swashbuckle.AspNetCore#1030

@saber-wang
Copy link
Author

@thangchung Yes, just add netcoreapp 3.0 to the targetFramework,I compiled it myself for the time being.

@Mortana89
Copy link

I still see this issue with even changing the target framework of our application to netcoreapp 3.0

@saber-wang
Copy link
Author

@Mortana89 You need to compile Ocelot yourself and modify incompatibilities,You can see #1025 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants