Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msbuild2-final' has a package type 'DotnetCliTool' that is not supported by project

10,273

Open your .csproj file and add the lines:

<PackageReference Include="Microsoft.EntityFrameworkCore.Tools"
    Version="1.0.0-msbuild2-final" />
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
    Version="1.0.0-msbuild2-final" />
Share:
10,273
xiaobo
Author by

xiaobo

Updated on June 06, 2022

Comments

  • xiaobo
    xiaobo about 2 years

    When I use Visual Studio 2017 RC to create netcore project and Nuget Microsoft.EntityFrameworkCore.Tools.DotNet, but I get an error.

    Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msbuild2-final' has a package type 'DotnetCliTool' that is not supported by project 'src\WebApplication1'.

    How do I resolve it?

  • Nour
    Nour over 7 years
    Same works for <ItemGroup> <DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0-msbuild3-final" /> </ItemGroup>
  • Ilan
    Ilan about 7 years
    same trick works for installing EF tools.dotnet for a console app i.e. Install-Package Microsoft.EntityFrameworkCore.Tools.DotNet fails (package type 'DotnetCliTool' that is not supported ...) but manually editing the .csproj and adding <DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.1" /> works. Thanks.