dotnet / EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6
https://docs.microsoft.com/ef/
Creative Commons Attribution 4.0 International
1.62k stars 1.96k forks source link

Installing Global EF Tool with multiple nuget feeds setup missing mention of cli argument. #2387

Open joshbartley opened 4 years ago

joshbartley commented 4 years ago

When attempting to install the global EF tool, the cli uses Nuget to pull down the tool and if you have multiple nuget sources, and/or if one of them fail to respond with the package the installation fails. The fix is to add --ignore-failed-sources to the command. This argument is only referenced in the dotnet restore documentation and issues on Github.

Adding a Note for the documentation that if a user has multiple feeds and received the dotnet : The tool package could not be restored. to include the argument --ignore-failed-sources would help to prevent searching the error message to resolve the issue.

Argument Issue Reference https://github.com/dotnet/sdk/issues/9886


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ajcvickers commented 4 years ago

Note from triage: link to the .NET tools documentation rather than documenting individual options here.

ir2000 commented 3 years ago

Does not work when you have multiple nuget sources (feeds) and one fails: dotnet tool install --global dotnet-ef

Works: dotnet tool install --global dotnet-ef --ignore-failed-sources

Would be really helpful to mention that as common issue in the documentation. Took me quite some time to figure out why this fails.

Related error messages: Response status code does not indicate success: 401 (Unauthorized). The tool package could not be restored.

The link in the error message (https://aka.ms/failure-installing-tool) actually leads to a solution but can be missed easily.

Related documention: https://docs.microsoft.com/en-us/ef/core/cli/dotnet https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/cli/dotnet.md