I'm following Entity Framework Core instructions step by step. At some point it says to
locate the tools section and add the Microsoft.EntityFrameworkCore.Tools.DotNet package as shown below
project.json
:
"tools": {
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final",
"Microsoft.AspNetCore.Razor.Tools": "1.0.0-preview2-final",
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
As I understand, project.json is gone now. So where am I supposed to add this value? Project file?
In the project.json
/xproj
format, it goes at the top-level in project.json
: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json#tools
In the new csproj
system, it's represented by DotNetCliToolReference
. There's basically no documentation for this that I could find; I only found it by reading the source of dotnet-migrate
.
An example of that looks like this:
<Project ...>
<Import .../>
<PropertyGroup .../>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet">
<Version>1.0.0</Version>
</DotNetCliToolReference>
</ItemGroup>
</Project>
A more complete example of the output of dotnet-migrate
is here.