Domanda

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

È stato utile?

Soluzione

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.

Altri suggerimenti

Please see the following blog.

If I understood correctly end result doesn't have any references to *the Fody. That means that in the example I don't see how did you* actually define the null guard to be enabled for the first method argument and not to the second?

Tatu

The reply to the above was:

@Tatus Yes the final assembly has no references to Fody or any Fody extensions you used.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top