title: Getting all types that implement an interface in .NET Core
body: <p>Using reflection, How can I get all types that implement some specific interface in <strong>.NET Core</strong>? I have noticed that the methods usable in .NET 4.6 are not available anymore.</p>
  
  <p>For example, this code doesn't work.</p>
  
  <pre><code>var type = typeof(IMyInterface);
  var types = AppDomain.CurrentDomain.GetAssemblies()
      .SelectMany(s =&gt; s.GetTypes())
      .Where(p =&gt; type.IsAssignableFrom(p));
  </code></pre>
  
  <p>It throws <code>The name 'AppDomain' does not exist in the current context</code> error.</p>