Search code examples
c#.netfodyfody-propertychanged

Does Fody leave any references/traces in final assembly?


Are there are any traces of Fody, or its dependencies (references), in the final weaved assembly?


Solution

  • So this really should be Several questions

    Does Fody leave any references in final assembly?

    No Fody does not require any references not add any reference during ILWeaving. Nor does it require than any files be deployed to be used a runtime

    Does Fody leave any traces in final assembly?

    Yes. Due to the nature of MSBuild and Visual studio it is very dificult to tell if an assembly has been changed as part of a build. As such Fody injects an internal interface named ProcessedByFody into your assembly. This allows Fody to avoid double processing of assemblies. https://github.com/Fody/Fody/wiki/TaskAddsAFlagInterface

    Do Fody addins leave any traces in final assembly?

    Well the obvious answer to this one is "Yes". All addins modify the target assembly in some way.

    Do Fody addins leave any references in final assembly?

    This is optional and up to the creator of the addin. While many addins have a dll to reference this is usually just to provide metadata. The addin then removes the reference at compile time. Meaning that it is not necessary to deploy that reference dll. For example https://github.com/Fody/PropertyChanged/wiki/WeavingWithoutAddingAReference

    However you should check the behavior of the specific addins you are using.