3
votes

When I try to install the package Microsoft.EntityFrameworkCore.Tools.DotNet version 1.1.0-preview4-final I have the error (translated from french) :

The pakage Microsoft.EntityFrameworkCore.Tools.DotNet 1.1.0-preview4-final' has a package type 'DotnetCliTool' that is not supported by project 'my web app project'

I have already check :

  • .NET Core 1.1 SDK is installed on my computer
  • My web app targets .NETCoreApp 1.1 framework
  • All my NuGet packages are up to date

Environment info :

  • Visual Studio 2017 RC
  • ASP.NET Core Web Application, .NETCoreApp 1.1

NuGet package list

The few things I found about errors like this one included to update project.json, file I don't have in my solution.

I also try to add this line in my csproj :

 <ItemGroup><DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-msbuild3-final" /></ItemGroup>

Someone have an idea about what happens here ? How can I manage db migrations with .NETCore 1.1 ?

1

1 Answers

4
votes

If you are using MSbuild (Visual Studio 2017) then you should use Microsoft.EntityFrameworkCore.Tools.DotNet in 1.0.0-msbuild3-final verison

To do this, update your csproj and add the next line in the same ItemGroup than the NuGet package references :

<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-msbuild3-final" />