I created a new Web Api project after installing the latest visual studio updates for TC 2.
Added entity Microsoft.EntityFrameworkCore": "1.0.0-rc2-final
and Microsoft.EntityFrameworkCore.Tools: 1.0.0-preview1-final
to the project.
Opened a command line and typed dotnet ef
.
At this point I got an error:
Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
Have I got the wrong tools version?
The version I used is what was available from intellisense.
Excerpt from project.json:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
"Microsoft.EntityFrameworkCore": "1.0.0-rc2-final",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final",
"Microsoft.NETCore.Platforms": "1.0.1-rc2-24027",
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview1-final" ,
"type": "build"
}
},
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
},
"Microsoft.EntityFrameworkCore.Tools": {
"imports": [ "portable-net451+win8" ],
"version": "1.0.0-preview1-final"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8",
"portable-net451+win8"
]
}
},
Newtonsoft.Json
8.0.3 explicitly in"dependencies"
orproject.json
. Just add the line"Newtonsoft.Json": "8.0.3",
. Additionally it could be helpful to search forNewtonsoft.Json
7.0.0.0 in the fileproject.lock.json
(search for"Newtonsoft.Json": "7.0.0"
orNewtonsoft.Json/7.0.0
). I'd recommend you to verify which NuGet configuration will be used. Wrong NuGet configuration could prevent loading of the latest version of dependencies.