Skip to content
Kevin B edited this page Dec 18, 2018 · 2 revisions

Frequently Asked Questions

How do I migrate from 3.x to 4.x?

There are several breaking changes when moving from AutoDI 3.x to 4.x

  1. Remove the AutoDI.Fody NuGet package and replace it with the AutoDI.Build NuGet package. Going forward this will be the only one that is maintained.
  2. Move any AutoDI configuration from FodyWeavers.xml to assembly attributes. The previous configuration leveraged the FodyWeavers.xml files as a way to configure AutoDI, moving forward the solution will be to configure AutoDI using assembly attributes. All properties and allowed values should directly translate to the attributes listed below.
    • Generic configuration like Behaviors, can be set on the AutoDI.SettingsAttribute
    • Map and Type configuration can be set using the MapAttribute
    • Assembly configuration can be set using the IncludeAssemblyAttribute

Why not use Fody for the IL weaving?

This project (version 3.x and earlier) was originally built using Fody. Starting with version 4.0.0, I moved away from using Fody. This was largely due to the change to Fody's licencing that changed with version 3.3.3. There is now the expectation that all users of Fody (both the authors of Fody weavers and users that consumes a Fody weavers) should become patrons of Fody. Though I am certainly happy to see Fody receive funding to ensure its longevity, I felt this put an additional burden on anyone using AutoDI. With the MIT licensing it would be possible to simply ignore it, and continue to use Fody; however that would go against the spirit of the license. In the end I felt it was best to simply remove Fody and continue moving AutoDI forward without it.