Keeping MEF composition intact under obfuscation - DEV Community
MEF matches a plugin to an import by a contract-name string, and by default that string is the full type name of the contract. Rename the contract interface and the derived string moves, so composition silently returns nothing. This post reads how GetContractName derives the match key, why [ExportMetadata] keys and metadata-view property names are a second naming surface, and how to pin explicit string contracts so Nebula renames the implementation while composition still resolves.