title: Using .NET Core CLI, add a reference to a local DLL when targeting the full framework
body: <p>I would like to know how to reference a local, unsigned CLR 4.0 assembly, when building a new Console application using the .NET Core tools and only targeting the .NET 4.5.1 framework.</p>
  
  <p>I did the following on a Windows 10 machine:</p>
  
  <ol>
  <li>Create a new MyLibrary.cs with the following code:</li>
  </ol>
  
  <pre class="lang-cs prettyprint-override"><code>using System;
  namespace MyNamespace
  {
    public class MyLibrary
    {
      public static void SayHi()
      {
        Console.WriteLine("Hi");
      }
    }
  }
  </code></pre>
  
  <ol start="2">
  <li><p>Compile the above with <code>csc /t:library MyLibrary.cs</code>.</p></li>
  <li><p>Create a new folder and a .NET Core project.</p></li>
  </ol>
  
  <pre class="lang-dos prettyprint-override"><code>mkdir MyConsoleApp
  cd MyConsoleApp
  dotnet new
  </code></pre>
  
  <ol start="4">
  <li>Edit the auto-generated project.json file to target .NET 4.5.1.</li>
  </ol>
  
  <pre class="lang-js prettyprint-override"><code>{
    "version": "1.0.0-*",
    "buildOptions": {
      "debugType": "portable",
      "emitEntryPoint": true
    },
    "dependencies": {},
    "frameworks": {
      "net451" : { } 
    }
  }
  </code></pre>
  
  <ol start="5">
  <li>Test that the project builds and runs. It does.</li>
  </ol>
  
  <pre class="lang-dos prettyprint-override"><code>dotnet restore
  dotnet build
  bin\Debug\net451\MyConsoleApp.exe
  </code></pre>
  
  <ol start="6">
  <li>Edit Program.cs to call code in MyLibrary.dll. </li>
  </ol>
  
  <pre class="lang-cs prettyprint-override"><code>public static void Main(string[] args)
  {
      Console.WriteLine("Hello World!");
      MyNamespace.MyLibrary.SayHi();
  }
  </code></pre>
  
  <p>And this is where I am stuck.</p>
  
  <p><strong>Where do I place my DLL and what do I put in the project.json</strong> so that I can call code in my assembly?</p>