Getting interface implementations in referenced assemblies with Roslyn
问题 I'd like to bypass some classical assembly scanning techniques in a framework I am developing. So, say I've defined the following contract: public interface IModule { } This exists in say Contracts.dll . Now, if I want to discover all implementations of this interface, we would probably do something similar to the following: public IEnumerable<IModule> DiscoverModules() { var contractType = typeof(IModule); var assemblies = AppDomain.Current.GetAssemblies() // Bad but will do var types =