title: C# RoslynCompiler fails when a class inherits Dictionary<T1, T2>
body: <p>It appears that for some reason, Roslyn on .NET Core is throwing an error when a class that inherits from <code>Dictionary</code> is accessed.</p>
  
  <blockquote>
    <p>CS0012: The type 'Dictionary&lt;,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Collections, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.</p>
  </blockquote>
  
  <p>My syntax tree looks like so:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.IO;
  using System.Linq;
  using System.Reflection;
  using System.Runtime.CompilerServices;
  using JQL.Core;
  
  namespace RoslynCompileSample
  {
      public class Writer
      {
          public object LinqIt(string outKey, Dictionary&lt;string
  
              IEnumerable&lt;TestClass&gt;&gt; db)
          {
              return db[outKey] = ({$linq
              });
          }
      }
  }
  </code></pre>
  
  <p>And my references:</p>
  
  <pre><code>MetadataReference[] references = new MetadataReference[]
  {
      MetadataReference.CreateFromFile(typeof(JQLQuery).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(object).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(Enumerable).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(System.Runtime.AssemblyTargetedPatchBandAttribute).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(DynamicAttribute).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(System.Collections.Generic.Dictionary&lt;,&gt;).Assembly.Location),
      MetadataReference.CreateFromFile(typeof(System.Collections.Generic.Dictionary&lt;string,object&gt;).Assembly.Location)
  };
  </code></pre>
  
  <p>My class</p>
  
  <pre><code>    public class TestClass : Dictionary&lt;string, object&gt;
      {
          public int age { get; set; }
  
          public TestClass()
          {
              this.age = 10;
          }
      }
  </code></pre>
  
  <p>Dictionary works if the object is defined from within the Roslyn SyntaxTree. If any Dictionary or inherited objects are passed in, I get the error.</p>
  
  <p>Any idea what may be causing this? My collections version is actually 4.3.0 so not sure why it's even asking for a lower version.</p>