There should be no harm using the newer tool with older versions of EF. You'll get bug fixes and features to the tool that should all be backwards compatible. Unless you are using different major versions (2.x vs 3.x) I think in this instance that --global
is the right way to install/update the tool.
Otherwise you need to have a .config/dotnet-tools.json
file in your project (or a directory above it somewhere). This is the manifest file that the error says is missing. You can create a new one with dotnet new tool-manifest
but then you'll have to edit it yourself:
{
"version": "1",
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "3.1.7",
"commands": ["dotnet-ef"],
}
}
}
Once you've done that you need to run dotnet tool restore
to restore and install the tool locally. More info on the manifest file can be found here. For dotnet-ef
specifically, see here.
I'm not certain, but fairly positive that if you attempt to install the tool locally it should create the manifest and add the necessary info if it doesn't already exist. You might just need to try running dotnet tool install dotnet-ef
within the project directory (and not update
).