-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DependencyInjection with MvcPluginLoader #52
Comments
Hi Martijn, Have you looked at the example (Example.Mvc.Razor) https://github.com/merken/Prise/blob/master/samples/Example.Mvc.Razor/Controllers/HomeController.cs ? All service registration should be done in the ConfigureServices method in .NET, not sure why you'd move that to the Configure method (this is mainly for App configuration, not services) https://github.com/merken/Prise/blob/master/samples/Example.Mvc.Razor/Startup.cs#L31 |
Thanks. I've looked at the code provided however I want to enable these plugins as soon as the application boots. Which is why I am doing it in However when the plugins are booted in ConfigureServices the controllers correctly construct with DepedencyInjecten but if it's called in Configure() it is not. |
Also when I followed the example code in the repository this error occurs when trying to go to the route:
However when loaded in ConfigureServices it works perfectly fine. |
Hi Martijn, Please provide a reproduction repo for this. |
Hi,
First off nice library, second of all I'm trying to get the
Prise.Mvc
to work with Dependency Injection. I got it to work when when loading the plugins inConfigureServices
however when I move it toConfigure
it can't initialize the plugin.This is my code for activating the plugins:
And this is my controller in the plugin:
I'm using the latest version of the plugin and .NET 5.0
The text was updated successfully, but these errors were encountered: