title: Returning or inheriting a generic that contains a nested class
body: <p>I am noticing some extremely strange behaviour when using a class layout that looks like this:</p>
  
  <pre><code>// Contents of assembly A:
  public class MyParentClass
  {
      public class NestedClass
      {
      }
  }
  
  // Contents of assembly B:
  public class AnotherClass : List&lt;MyParentClass.NestedClass&gt;
  {
  }
  </code></pre>
  
  <p>I can add assembly A as a dependency of assembly B. This example will compile without any error messages, but when it comes to, for example, loading assembly B as a reference for unit testing, I will receive this error when it comes time to compile unit tests:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'AssemblyB, Version=1.0.0.0, Culture=neutral,
         PublicKeyToken=null' or one of its dependencies. The system cannot find the
         file specified.</p>
  </blockquote>
  
  <p>The assembly that this code generates does actually work, and I can run through the generated DLL with Redgate Reflector and see my code as expected, but the unit tests refuse to load it.</p>
  
  <p>I am almost positive that this issue is to do with the fact that I am calling a nested class that is in another assembly, and I will probably end up refactoring this design anyway, but I would really like to know why this does not work as expected. If there was a problem with using the classes in this fashion, I would expect the compiler to throw an exception.</p>
  
  <p>Thank you for your time.</p>