rebus-org / Rebus.MySql

:bus: MySQL integration for Rebus
https://mookid.dk/category/rebus
Other
7 stars 6 forks source link

Update needed for Rebus 6.0.0? #8

Closed sbmw closed 4 years ago

sbmw commented 4 years ago

Hi, I upgraded Rebus.ServiceProvider to v5.0.1 while Rebus.MySql is still at v1.1.2.

I'm now getting this error:

Exception has occurred: CLR/Rebus.Injection.ResolutionException
An exception of type 'Rebus.Injection.ResolutionException' occurred in Rebus.dll but was not handled in user code: 'Could not resolve Rebus.Subscriptions.ISubscriptionStorage with decorator depth 0 - registrations: Rebus.Injection.Injectionist+Handler'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception     System.MissingMethodException : Method not found: 'System.Collections.Generic.HashSet`1<!!0> Rebus.Extensions.EnumerableExtensions.ToHashSet(System.Collections.Generic.IEnumerable`1<!!0>)'.

My setup is as follows:

services.AddRebus(configure => configure
    .Logging(l => l.Console(LogLevel.Warn))
    .Subscriptions(x => x.StoreInMySql(connectionString, "Subscriptions", true, true))
    .Transport(t => t.UseMySql(connectionString, "Transport", configuration["AppName"])));

services.AutoRegisterHandlersFromAssembly(assemblyName);

Do I need to update my setup or am I right in thinking this is a MySql package issue?

Thanks! Matt

mookid8000 commented 4 years ago

it's because code changes are required to make it compatible with Rebus 6.... stay tuned 🙂

mookid8000 commented 4 years ago

Rebus.MySql 2.0.0 is on NuGet.org now! Thanks for reminding me to do this 😁

sbmw commented 4 years ago

Thank you so much for that amazingly fast update! BUT unfortunately I still see the same error on updating to Rebus.MySql 2.0.0... Is there anything I need to change in my config?

sbmw commented 4 years ago

The full error:

Exception has occurred: CLR/Rebus.Injection.ResolutionException An exception of type 'Rebus.Injection.ResolutionException' occurred in Rebus.dll but was not handled in user code: 'Could not resolve Rebus.Subscriptions.ISubscriptionStorage with decorator depth 0 - registrations: Rebus.Injection.Injectionist+Handler' Inner exceptions found, see $exception in variables window for more details. Innermost exception System.MissingMethodException : Method not found: 'System.Collections.Generic.HashSet1<!!0> Rebus.Extensions.EnumerableExtensions.ToHashSet(System.Collections.Generic.IEnumerable1<!!0>)'. at Rebus.MySql.Subscriptions.MySqlSubscriptionStorage.d11.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Rebus.MySql.Subscriptions.MySqlSubscriptionStorage.EnsureTableIsCreated() at Rebus.Config.MySqlConfigurationExtensions.<>cDisplayClass0_0.b__0(IResolutionContext c) at Rebus.Injection.Injectionist.Resolver`1.InvokeResolver(IResolutionContext context) at Rebus.Injection.Injectionist.ResolutionContext.Get[TService]()

mookid8000 commented 4 years ago

ah, damn! could you try Rebus.MySql 2.0.1 ?

sbmw commented 4 years ago

Sorry for the slow reply. Yes, that works perfectly! Thanks for the quick fix and the amazing product suite!