Bootstrapping dependencies (using StructureMap) in winforms

I am trying to keep the IoC registration aside as it is done in CodeCampServer through the DependencyResolution project, so that only one project in my solution contains a link to StructureMap.

I have interface implementations in my Client / UI project that I want to register, which means that in this DependencyResolution project there should be a link to my Client / UI project.

But how can I start loading dependency settings from my Client / UI project without reference to the DependencyResolution project to initiate the registration of dependencies?

I used the HttpModule method before from an MVC application (similar to how CodeCampServer does it), but I'm trying to figure out how to do this in a WinForms application.

+4
source share
1 answer

Cavet: I do not claim to have much experience with WinForms. I believe Jeremy Build Your Own CAB 's blog article chain discusses the issue of compiling testable desktop applications.

+1
source

Source: https://habr.com/ru/post/1300915/