I am trying to develop my first ASP.Net web application and in my solution I have two projects. A Web Application and Class Library (Package). When I build the ASP.Net 4.5 version of this application I put my Entity Framework 6 entities into a class library, so I am doing that in the ASP.Net 5 version. The problem is when I install EntityFramework.Commands to the class library I get the error:
The dependency EntityFramework.Command 7.0.0-rc1-final in Project DBEntities does not support framework .NetPlatform, Version = 5.4
My understanding from this SO question is that dotnet5.4 is the new .Net 5 which is supposed to be supported by EF7.
Here is my project.json file:
{
"version": "1.0.0-*",
"description": "FFInfo.DAL Class Library",
"authors": [ "Mathew" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
},
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final"
}
}
Did I install the wrong package, is EF7 changed so much that I am building out the class wrong, or am I missing something in my json file?
EDIT: New project.json file based off suggestions
{
"version": "1.0.0-*",
"description": "FFInfo.DAL Class Library",
"authors": [ "Mathew" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"dotnet5.4": {
"dependencies": {
"Microsoft.AspNet.Hosting.Abstractions": "1.0.0-*",
"Microsoft.Dnx.Runtime": "1.0.0-*",
"Microsoft.Extensions.CommandLineUtils.Sources": {
"version": "1.0.0-*",
"type": "build"
},
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
"System.Console": "4.0.0-*",
"System.IO.FileSystem": "4.0.1-*"
}
},
"netcore50": {
"bin": {
"assembly": "lib\\netcore50\\_._"
}
},
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final"
}
}
}


dotnet5.4is synonym ofdnxcore50and notdnx451(see the official announcement). I personally find the changes of names vary bad. I would recommend you to renamedotnet5.4todnxcore50first of all. Probably you should usenet451ordnx451instead of"frameworks"."dotnet5.4"."dependencies"if your class library is for ASP.Net 4.5 mostly? In any way I would recommend you to add"dnx451": { }(or"net451": { }) back to"frameworks". If you would be able to reproduce the problem I can try to help more..Net 4.5I want it to target.Net 5.0 coreThisClass Libraryis for theASP.Net 5version of my web app."dotnet5.4"to"dnxcore50". If it would work I would post my answer with more detailed explanation. I think that you can remove additionally all"dependencies"included in"frameworks"."dotnet5.4"("frameworks"."dnxcore50") and probably use the common"dependencies", but include only really required dependencies. The optimization of `"frameworks"``is independent from your main problem.