The System.Data.SQLite binaries are targeted for the .NET 2.0 runtime. When referencing a .NET 2.0 mixed mode assembly in a .NET 4.0 project, additional configuration is required:
OK, that's fine. But when running an NServiceBus endpoint in the NServiceBus.Host.exe executable, it seems that this setting in App.config does not get applied in the context of NServiceBus.Host.exe. So, to get this to work, we had to turn the NServiceBus endpoint into a console application with a
Main
method that used reflection to invoke the Main
method of NServiceBus.Host.exe. Doing this enables the above setting to be applied in the context of NServiceBus.Host.exe.It took us the better part of a day to figure this out, so I'm memorializing it here for (my own) future reference.
2 comments:
What you need to do is provide an NServiceBus.Host.exe.config file and put the startup section in there.
Thank you a lot! It’s really helpful..Blackmart market helper Freestore
Post a Comment