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"
}
}
}