VNext: Links to projects other than vNext
Can non-vNext projects (like C # class libraries) be referenced from an ASP.NET vNext project?
- Create Blank Visual Studio Solution
- Create C # Standard Class Library
- Create Blank ASP.NET vNext Web Project
When trying to reference a class library, the following error occurs:
The following projects are not supported as references "...."
Update
I tried to create custom vNext class library project files for them in one place (with a corresponding project.json file for dependencies), but I should have noticed that many NuGets (like Ninject) cannot be loaded / compiled this way, this option is obviously , doesn't work either.
"frameworks": {
"net45": { // doesn't work
"dependencies": {
"Ninject": "3.2.2.0",
"Ninject.Extensions.Interception": "3.2.0.0"
}
}
}
...
"aspnet50": { // doesn't work either
"dependencies": {
"Ninject": "3.2.2.0",
"Ninject.Extensions.Interception": "3.2.0.0"
}
},
source to share
This is not supported in Beta 1 or earlier, but is on track for an upcoming feature wrap
that allows you to wrap traditional class libraries in project.json
that vNext projects can understand.
See fooobar.com/questions/263796 / ... for details .
As far as Nuget packages are concerned, it depends on which target framework they support. I actually had no problem targeting net45,
, but obviously the results are more mixed with others now.
source to share