You can do it! First we need to understand that "old-style" projects output and reference DLLs. The ASP.NET 5 projects output and reference NuGet packages.
First set up a local nuget repository. Luckily this can be a folder. Then add that to folder NuGet.Config file.
<config>
<add key="localrepo" value="C:\Temp" />
<the rest of your file />
</config>
You can also do this through the Tools -> Options -> NuGet Package Manager -> Package Sources window in Visual Studio.
Then navigate your commandline to the ASP.NET 5 class library you want to reference. Drag down the dependencies with
kpm restore
Then build and pack it and output the result to your local repository folder.
kpm pack --out C:\Temp
Now you should be able to add the nupkg from kpm pack as a nuget reference in your "old style" project. Use your normal way of Managing NuGet Packages from Visual Studio if you wish.
Note: Your ASP.NET 5 class library needs to target net45 for this to work. Make sure this is in the framework section of your project.json
...
"frameworks": {
"net45": {},
// Other frameworks
}
...
Alternatively:
If you want to do it quick and dirty you can run
kpm build
, and add a direct DLL reference. The DLLs location should be listen in the output from kpm build.
artifacts\bin\[CONFIGURATION]\[FRAMEWORK]by VS, then you can add a reference from this build output I guesskvm buildin a post build event can do the trick