title: Using Reflection in .NET Core
body: <p>For cross-platform development, I'm trying to make a .NET Core shared library.  I used the <code>Class Library (package)</code> project template in VS 2015.  My library needs to use a couple reflection mechanisms I am familiar with from the full .net 4 framework, but I don't now how to access these in a .NET Core library.  Specifically:</p>
  
  <ul>
  <li>The <code>Delegate</code> type has a <code>Method</code> property that returns a <code>MethodInfo</code> object.</li>
  <li>The <code>Type</code> class has a <code>BaseType</code> property, <code>FilterName</code> property, <code>InvokeMember</code> method and <code>FindMembers</code> method I can't reach in .NET Core.</li>
  </ul>
  
  <p>I added NuGet packages that allegedly have the reflection pieces I need:</p>
  
  <pre><code>"frameworks": {
    "net451": {
      "dependencies": {
        "System.Reflection": "4.1.0-beta-23516",
        "System.Reflection.Extensions": "4.0.1-beta-23516",
        "System.Reflection.Primitives": "4.0.1-beta-23516",
      }
    },
    "dotnet5.4": {
      "dependencies": {
        "Microsoft.CSharp": "4.0.1-beta-23516",
        "System.Collections": "4.0.11-beta-23516",
        "System.Linq": "4.0.1-beta-23516",
        "System.Reflection": "4.1.0-beta-23516",
        "System.Reflection.Extensions": "4.0.1-beta-23516",
        "System.Reflection.Primitives": "4.0.1-beta-23516",
        "System.Runtime": "4.0.21-beta-23516",
        "System.Threading": "4.0.11-beta-23516"
      }
    }
  },
  "dependencies": {
    "System.Reflection.TypeExtensions": "4.1.0-beta-23516"
  }
  </code></pre>
  
  <p>I've also added <code>using System.Reflection</code>, but I still am getting errors that indicate that these properties and types are undefined.  </p>
  
  <p>What am I doing wrong?</p>
  
  <p>In case it is relevant, on this same machine the command <code>dnvm list</code> shows:</p>
  
  <pre><code>Active Version           Runtime Architecture OperatingSystem Alias  
  ------ -------           ------- ------------ --------------- -----  
      1.0.0-rc1-update1 clr     x64          win                    
      1.0.0-rc1-update1 clr     x86          win                    
      1.0.0-rc1-update1 coreclr x64          win                    
  *    1.0.0-rc1-update1 coreclr x86          win             default
  </code></pre>
  
  <p>The above is exactly what I want...or at least what I think I want. ;)</p>