-
In version 7.2, the configureservicelocator method in prismapplicationbase is injected into iservicelocator, However, in version 8, this method was canceled. How to inject into iservicelocator for compatibility with previous versions |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@LostAsk we have dropped the dependency on IServiceLocator in Prism 8 which is why it is no longer there. If you have a dependency on it, it tells me there is probably some code smell where you are doing some things that you shouldn't be doing. While there are some legitimate use cases for it, I would encourage you to re-evaluate the code and look how you can pull it out. Assuming for a moment that you have a legitimate use case for why you might need it, you can either use Prism's abstractions or register IServiceLocator yourself. |
Beta Was this translation helpful? Give feedback.
@LostAsk we have dropped the dependency on IServiceLocator in Prism 8 which is why it is no longer there. If you have a dependency on it, it tells me there is probably some code smell where you are doing some things that you shouldn't be doing. While there are some legitimate use cases for it, I would encourage you to re-evaluate the code and look how you can pull it out. Assuming for a moment that you have a legitimate use case for why you might need it, you can either use Prism's abstractions or register IServiceLocator yourself.