I created a new Class Library (.Net Core) and wanted to add the package Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0
. However I refuses and I get the following error
Severity Code Description Project File Line Suppression State Error Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0' has a package type 'DotnetCliTool' that is not supported by project 'MyVS2017Project'. 0
I also tried it in a Class Library (.Net Framework)
Same error message when using the Package Manager Console command
Install-Package Microsoft.EntityFrameworkCore.Tools.DotNet
CLI tool packages cannot be added as standard package references. You need something like this in your csproj file:
<ItemGroup>
<DotNetCliToolReference
Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.0.0" />
</ItemGroup>
This is a bug/limitation in NuGet. See https://github.com/NuGet/Home/issues/4190 for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With