Documentation
Documentation copied to clipboard
WinForms problem with main view using DI
The documentation gives an example of how to use Simple Injector in WinForms projects. The example shows the code for the main view/main form with only a DI constructor.
The problem is, that the code as given throws an exception in one of the SI lines stating that the main view requires a parameterless constructor!
If I put the default constructor then the form does not work well.
Constructor injection in Forms does work, so there is something going on that we can't determine from your question. Please share are a minimal complete verifiable example.