I am trying to follow this tutorial on creating an ASP.NET Core MVC and Entity Framework Core app, and I tried installing the NuGet package Microsoft.EntityFrameworkCore.Tools.DotNet, as the topic "Entity Framework Core NuGet packages" in the tutorial instructs. I received the error message "Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0' has a package type 'DotnetCliTool' that is not supported by project 'ContosoUniversity'".
Whether I try installing the package using the Package Manager Console or the NuGet Package Manager, I get the error message. The full error message that the Package Manager Console shows is the following:
Install-Package : Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0' has a package type 'DotnetCliTool' that is not
supported by project 'ContosoUniversity'.
At line:1 char:1
+ Install-Package Microsoft.EntityFrameworkCore.Tools.DotNet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
I made sure that my ContosoUniversity.csproj file included the DotNetCliToolReference for Microsoft.EntityFrameworkCore.Tools.DotNet, as suggested in Stack Overflow:
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" />
</ItemGroup>
This issue has been reported on GitHub, already. I am using Visual Studio 2017. Thank you.