3

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 Answer 1

4

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" />
Sign up to request clarification or add additional context in comments.

2 Comments

I already tried but the line has to be in the same item group than the NuGet packages to work. It's working now.
There is no such requirement on item groups. You can add toolreferences in own item group too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.