No executable found matching command "dotnet-ef" on Ubuntu
Trying to do a dotnet ef database update on Ubuntu 16.04
root@CSDA:/var/csda# dotnet ef database update No executable found matching command "dotnet-ef"
- Create Asp.net core application in VS 2017 RC on Windows
- Add Code First models
- Add SapientGuardian.EntityFrameworkCore.MySql package
- Change DbContext to UseMySQL
- Works on Windows
- Publish to Ubuntu server
- Run dotnet ef database update
- Error
.NET Core SDK 1.0 rc4 build 004771 installed on Ubuntu
If I try to add the Install-Package Microsoft.EntityFrameworkCore.Tools.DotNet -Pre I get this error
Package 'Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msbuild1-final' has a package type 'DotnetCliTool' that is not supported by project
@aswanevelder
- Do you
Microsoft.EntityFrameworkCore.Tools.DotNetpackage listed in your csproj? - Were you using
dotnet efin windows or powershell commands?
Dupe of NuGet/Home#4190. Until then, manually add it to your *.csproj:
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet"
Version="1.0.0-msbuild3-final" />
</ItemGroup>
That is in and works on Windows, for some reason not on Ubuntu. I created this project with the latest VS 2017 RC release.
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-msbuild3-final" />
<DotNetCliToolReference Include="Microsoft.Extensions.SecretManager.Tools" Version="1.0.0-msbuild3-final" />
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0-msbuild3-final" />
</ItemGroup>
@aswanevelder The .NET Core SDK RTMed today. Could you try again? If you're still having issues, could you submit a new issue on the dotnet/cli repo?