title: Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext
body: <p>I want to use Ninject in an Asp.Net vNext Class Library. But I get Compiler Error CS0246 ("The type or namespace name 'Ninject' could not be found").</p>
  
  <p>Here is what i have done:</p>
  
  <p>1) Create a new <code>ASP.NET vNext Class Library</code></p>
  
  <p>2) Edit <code>project.json</code>:</p>
  
  <pre><code>{         
      "dependencies": {
          "Ninject": "3.2.2.0"
      },
      "configurations" : {
          "net451" : { 
              "dependencies": {
              }
          },
          "k10" : { 
              "dependencies": {
                  "System.Runtime": "4.0.20.0"
              }
          }
      }
  }
  </code></pre>
  
  <p>3) Check Package Manager Log:</p>
  
  <pre><code>Restoring packages for C:\Projects\ClassLib1\project.json
  Attempting to resolve dependency ClassLib1 &gt;= 1.0.0
  Attempting to resolve dependency Ninject &gt;= 3.2.2.0
    GET https://www.nuget.org/api/v2/FindPackagesById()?Id='Ninject'
  Attempting to resolve dependency mscorlib &gt;= 
  Attempting to resolve dependency System &gt;= 
  Attempting to resolve dependency System.Core &gt;= 
  Attempting to resolve dependency Microsoft.CSharp &gt;= 
  Attempting to resolve dependency ClassLib1 &gt;= 1.0.0
  Attempting to resolve dependency Ninject &gt;= 3.2.2.0
  Attempting to resolve dependency System.Runtime &gt;= 4.0.20.0
    OK https://www.nuget.org/api/v2/FindPackagesById()?Id='Ninject' 1250ms
    GET https://www.nuget.org/api/v2/FindPackagesById?id='Ninject'&amp;$skiptoken='Ninject','3.0.2-unstable-9057'
    OK https://www.nuget.org/api/v2/FindPackagesById?id='Ninject'&amp;$skiptoken='Ninject','3.0.2-unstable-9057' 179ms
    GET https://www.nuget.org/api/v2/package/Ninject/3.2.2
    OK https://www.nuget.org/api/v2/package/Ninject/3.2.2 949ms
  Resolving complete, 2531ms elapsed
  Installing Ninject 3.2.2.0
  Restore complete, 2755ms elapsed
  </code></pre>
  
  <p>Looks fine ..</p>
  
  <p>4) Edit <code>Class1.cs</code>:</p>
  
  <pre><code>using Ninject;
  
  namespace ClassLib1
  {
      public class Class1
      {
          public Class1()
          {
              var kernel = new StandardKernel();
          }
      }
  }
  </code></pre>
  
  <p>Intellisense can resolve the references to Ninject.</p>
  
  <p><img src="https://i.stack.imgur.com/Mgfio.png" alt="enter image description here"></p>
  
  <p>5) Build and I got CS0246:</p>
  
  <pre><code>1&gt;------ Build started: Project: ClassLib1, Configuration: Debug Any CPU ------
  1&gt;  Building ClassLib1 .NETFramework,Version=v4.5.1
  1&gt;  Building ClassLib1 K,Version=v1.0
  1&gt;C:\Projects\ClassLib1\Class1.cs(1,7): error CS0246: The type or namespace name 'Ninject' could not be found (are you missing a using directive or an assembly reference?)
  1&gt;C:\Projects\ClassLib1\Class1.cs(9,30): error CS0246: The type or namespace name 'StandardKernel' could not be found (are you missing a using directive or an assembly reference?)
  1&gt;  
  1&gt;  Build failed.
  1&gt;      0 Warnings(s)
  1&gt;      2 Error(s)
  </code></pre>
  
  <p>What's wrong?</p>