I have an aspnetcore solution that I split into three projects:
- Project.Core dnxcore50 Main app - startup resides here and has Project.EF & Project.Model dependency
- Project.EF dotnet5.4 class libary - dbcontext resides here and has Project.Model dependency. dotnet-ef tools reside here
- Project.Models dotnet5.4 class library
Using the dotnet cli tooling (dotnet-ef) I was able to add migrations to the project successfully. However when I execute update database to apply the migrations, I get an exception that I cant seem to resolve.
C:\Users\chris\Documents\project\core\src\Project.EF
dotnet ef database update -s ..\Project.Core
Could not load file or assembly 'System.Data.SqlClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
If anyone has some direction on how I can get this final piece working, it would be greatly appreciated. Below is copy of my Project.EF project.json
{
"dependencies": {
"Microsoft.EntityFrameworkCore": "1.0.0-*",
"Microsoft.EntityFrameworkCore.Commands": "1.0.0-*",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*",
"Microsoft.AspNetCore.Hosting": "1.0.0-*",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*",
"OpenIddict.EF": "1.0.0-*",
"Project.Models": "1.0.0-*"
},
"frameworks": {
"dotnet5.4": {
"imports": "portable-net451+win8",
"dependencies": {
"System.Data.SqlClient": "4.0.0-*"
}
}
},
"tools": {
"dotnet-ef": "1.0.0-*"
}
}