title: Use local class library as resource for Web API (ASP.NET Core 1.0)
body: <p>I'm stuck with very simple problem.</p>
  
  <p>I want to load local .NET 4 class library (dll) project to be used as resource in my new ASP.NET Web API project (first time trying asp.net)</p>
  
  <p>I'm familiar with Winforms apps and now trying to create a ASP.NET Web API to be able to access one of my helper DLL from PHP/linux server. I'm not sure if this is a good approach, but I'm trying to prevent from re-implementing the logic of the DLL in PHP code.</p>
  
  <p>The problem now is that I'm not able to add the DLL or the library class project to the resources of the Web API project.</p>
  
  <p>While trying to solve the problem i have tried:</p>
  
  <ol>
  <li>Visual Studio 2015 new project->ASP.NET web application->ASP.NET Core 1.0
  templates->Web API</li>
  <li>Create new Class Library project to the Web API solution (or import existing project)</li>
  <li>Add the project to Web API project references</li>
  <li>Add using directive of class library namespace to controller</li>
  <li>Try to build and it gets error:</li>
  </ol>
  
  <blockquote>
    <p>Error CS0246  The type or namespace name 'ClassLibrary1' could not be found (are you missing a using directive or an assembly reference?) WebApplication1.DNX Core 5.0</p>
  </blockquote>
  
  <p>For me it it seems that it's trying to fetch the resource from nuget or something.</p>
  
  <p>I hope some one can easily point me my mistake so I can continue to work with the actual work. (Or am I just miss using the Web API concept?)</p>
  
  <p>project.json</p>
  
  <pre><code>{
    "version": "1.0.0-*",
    "compilationOptions": {
      "emitEntryPoint": true
    },
  
    "dependencies": {
      "Microsoft.ApplicationInsights.AspNet": "1.0.0-rc1",
      "Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
      "Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
      "Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
      "Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
      "Microsoft.Extensions.Configuration.FileProviderExtensions" : "1.0.0-rc1-final",
      "Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
      "Microsoft.Extensions.Logging": "1.0.0-rc1-final",
      "Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
      "Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final"
    },
  
    "commands": {
      "web": "Microsoft.AspNet.Server.Kestrel",
    },
  
    "frameworks": {
      "dnx451": {
        "dependencies": {
          "ClassLibraryTest2": "1.0.0-*"
        }
      },
      "dnxcore50": { }
    },
  
    "exclude": [
      "wwwroot",
      "node_modules"
    ],
    "publishExclude": [
      "**.user",
      "**.vspscc"
    ]
  }
  </code></pre>