Unable to install the package EntityFrameworkCore.Tools.DotNet version 1.1.0-preview4-final

.net-core entity-framework-core msbuild nuget visual-studio-2017


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 ?

3/1/2017 3:14:09 PM

Accepted Answer

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" />
3/1/2017 3:14:50 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow