AutoDI icon indicating copy to clipboard operation
AutoDI copied to clipboard

Allow for processing types in dependant projects.

Open Keboo opened this issue 6 years ago • 1 comments

Currently constructors are only processed in types for the main module definition. As a work around we can include the weaver in the dependant assemblies as well, but this then requires putting in a "none" FodyWeavers.xaml file

<?xml version="1.0" encoding="utf-8" ?>
<Weavers>
  <!-- Don't process the types for registration, just doing this for the constructor injection -->
  <AutoDI Behavior="None"/>
</Weavers>

It should be possible to declare dependant assemblies with constructors to process (perhaps automatically pick up dependant AutoDI referencing assemblies).

Keboo avatar May 14 '18 21:05 Keboo

It is worth noting that the difficulty here being that Fody has additional logic around writing assemblies after they have been modified. We will need to replicate this.

Keboo avatar Jun 07 '18 19:06 Keboo