Reputation: 207
After upgrading my application to use NServiceBus 8 from NServiceBus 7 I had problems with my unit test project. I upgraded the NServiceBus.Testing package that my unit test project depends on to version 8.1.0, and my unit tests now fail with the following message:
System.TypeLoadException : Could not load type 'NServiceBus.IMessageProcessingContextExtensions' from assembly 'NServiceBus.Core, Version=8.0.0.0, ...'
My unit tests use the TestableMessageHandlerContext() and I'm passing that into my .Handle() on my handler object. That's when the error is thrown; when the .Handle() is invoked.
Referring to Particular's documentation one is supposed to use TestableMessageHandlerContext() with NserviceBus 8 (https://docs.particular.net/nservicebus/upgrades/testing-7to8) so I'm not sure what the problem is.
Upvotes: 0
Views: 92
Reputation: 207
Turned out there were some projects in my solution that were missing the upgrade. 🧐 It happens. Lesson is always recheck the basics.
Upvotes: 1