Hi,I'm trying to upgrade Episerver CMS & Commerce to latest version. Also from .NET Framework to .NET core.Struggle with different points, some of them with database but able to go through it.However one that can't understand is when running the prject it hangs on the initialization process, and debugging it I can see that is hanging on the ReportingInitializationModule When trying to ge tthe instance for ServiceProviderExtensions.GetInstance<ReportingOrderEventListener>(context.Locate.Advanced);
There are no specific error in the output window and the website goes on an endless loop.Any tips?
If you use the break feature in Visual Studio, and disable Just My Code option, can you get the stacktrace?
ReportingInitializationModule will intentionally get an instance of ReportingOrderEventListener to initiate it (adding events or so). may be it stucks with some of the dependencies
I've disabledunable to get the stacktrace
Did you try to start debugging then break it?
Sorry, didn't understood correctly the "break" you were mentioningI didn't went throw all but just come to mind that we've a customer IShippingPlugin, I've disabled all our IConfigurableModule and ModuleDependencies and now it's working.Now it's necessary to go one by one and see which one is breaking.Also, I couldn't find in documentation how the new UI for the IShippingPlugin and Gateway could be configured/designed. Is there any link you can help with?Thanks for the help and quick responses
When you start an app with debugging, if it "stucks", you can use the Break function to see what the stack trace is
In later versions of Commerce (which it seems you are using), you can configure the settings here (not sure if that's what you meant)
@Quan Mai Can a IShippingPlugin class inject IOrderRepository and/or IOrderNoteService on the constructor?I've that working in the previous version of Commerce before the upgrade to the latest one, in .NET CoreI'm getting in the endless loop, that's the issue related with the topic I raised
I don't know for sure, the dependency around Order system is pretty complicated. If you get circular reference, the workaround is to use ServiceAccessor<IOrderRepository> instead of IOrderRepository. I'm not exactly a fan of ServiceAccessor<IOrderRepository> because every time you call it it will build the dependency tree which is costly. but given that you are using it for IShippingPlugin which would not be called a lot, and if there is no better option, then you can go ahead with that.