Silly question perhaps but how do I add a reference from a class library to a web application?
- I have the
ASP Net 5 RC1update installed and ready to go. The project.json file looks like this in the class library project
Problem I get is, I have tried adding a reference to the web project via the dependencies section and I get the error
"The dependency Middleware 1.0.0 in project Middleware.Tests does not support framework .NETFramework,Version=v4.5.1. Middleware.Test"
It is glaringly obvious from the message why this is failing however, I am struggling to understand how do I add this reference?
I have tried adding different framework versions like net50 but still no luck.
{
"version": "1.0.0-*",
"description": "Middleware.Tests Class Library",
"authors": [ "Foo Man" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": {
"dependencies": {
"Middleware": ""
}
}
}
}
Edit as requested the web project.json file:
{
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000",
},
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final",
"Microsoft.AspNet.Hosting": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
"Microsoft.AspNet.Owin": "1.0.0-rc1-final"
},
"exclude": [
"wwwroot",
"node_modules"
],
"frameworks": {
"dnx451": {
"dependencies": {
}
}
},
"publishExclude": [
"**.user",
"**.vspscc"
],
"version": "1.0.0-*"
}

