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

'MassTransit.ExtensionsDependencyInjectionIntegration.Configuration.Registration.DependencyInjectionContainerR egistrar #21

Open
can-acar opened this issue Dec 12, 2019 · 0 comments

Comments

@can-acar
Copy link

can-acar commented Dec 12, 2019

Selam,
.Net Core 3.1'a upgrade yaptığımda aşağıdaki exceptionı alıyorum ;

System.TypeLoadException: Method 'RegisterExecuteActivity' on type 'MassTransit.ExtensionsDependencyInjectionIntegration.Configuration.Registration.DependencyInjectionContainerR
egistrar' from assembly 'MassTransit.ExtensionsDependencyInjectionIntegration, Version=5.5.2.0, Culture=neutral, PublicKeyToken=b8e0e9f2f1e657fa' tried to implicitly implement a
n interface method with weaker type parameter constraints.
   at MassTransit.ExtensionsDependencyInjectionIntegration.Configuration.Registration.ServiceCollectionConfigurator..ctor(IServiceCollection collection)
   at MassTransit.DependencyInjectionRegistrationExtensions.AddMassTransit(IServiceCollection collection, Action`1 configure)
   at MetroBus.Microsoft.Extensions.DependencyInjection.MetroBusExtensions.AddMetroBus(IServiceCollection serviceCollection, Action`1 configure)
   at ilan.BusConfig.UseBusService(IServiceCollection services, MqConstant mqConstant) in D:\Projects\x\ilan\BusConfig.cs:line 15
   at ilan.Startup.ConfigureServices(IServiceCollection services) in D:\Projects\x\ilan\Startup.cs:line 64
   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.<Invoke>g__Startup|0(IServiceCollection serviceCollection)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>c__DisplayClass8_0.<Build>b__0(IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.<UseStartup>b__0(HostBuilderContext context, IServiceCollection services)
   at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at ilan.Program.Main(String[] args) in D:\Projects\x\x\Program.cs:line 32

Problem;

 public class BusService : IHostedService
    {
        private readonly IBusControl BusControl;

        public BusService(IBusControl busControl)
        {
            BusControl = busControl;
        }

        public Task StartAsync(CancellationToken cancellationToken)
        {
            return BusControl.StartAsync(cancellationToken);
        }

        public Task StopAsync(CancellationToken cancellationToken)
        {
            return BusControl.StopAsync(cancellationToken);
        }

IBusControl'ı inject yaparken oluyor.

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

1 participant