Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for 20791: Adds command to update the tools to the latest version… #20792

Merged
merged 1 commit into from
Apr 23, 2021

Conversation

riscie
Copy link

@riscie riscie commented Apr 30, 2020

… to the version mismatch error message

@riscie
Copy link
Author

riscie commented Apr 30, 2020

Fix for #20791

@@ -343,7 +343,7 @@ Change your target project to the migrations project by using the Package Manage
<value>Using design-time services from assembly '{referencedAssembly}'.</value>
</data>
<data name="VersionMismatch" xml:space="preserve">
<value>The EF Core tools version '{toolsVersion}' is older than that of the runtime '{runtimeVersion}'. Update the tools for the latest features and bug fixes.</value>
<value>The EF Core tools version '{toolsVersion}' is older than that of the runtime '{runtimeVersion}'. Update the tools for the latest features and bug fixes. Use 'dotnet tool update --global dotnet-ef' to update to the latest version.</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be accurate if the tool is installed locally.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Splitting it up (global / local) would make the error message quite long. Do you still think the benefit is big enough to have it in there?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having wrong command is worse than having no command.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well sure. My question is wether we should include both commands.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a link to conceptual documentation would be better here. Probably pointing to https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree a link seems better. But this one does not include the update command for tools.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the documentation will need to be updated as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the most common solution directly in the error message + link for more details. this is how angular cli etc does it and it seems to work well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stumbled upon this today again. Any chance we can make progress on this (small) issue? Many people need to google on how to update tools. See this popular SO post: https://stackoverflow.com/questions/52108659/need-to-update-ef-core-tools

@ajcvickers ajcvickers self-assigned this May 8, 2020
@microsoft-github-updates microsoft-github-updates bot changed the base branch from master to main July 23, 2020 04:35
@ClassyCircuit
Copy link

Why isn't this merged? Just add the most common command that can be used to fix the error. If the most common command doesn't work (in case of locally installed) then just add a link to documentation.
Currently the most common way to fix this is:

  1. Search the error message online
  2. Find the first Stackoverflow link (https://stackoverflow.com/questions/52108659/need-to-update-ef-core-tools)
  3. Copy and run the command: dotnet tool update --global dotnet-ef

Why not just put it in error message? You don't need to support every obscure scenario, in 99% cases people install the EF tools together with VS, not locally.

@riscie
Copy link
Author

riscie commented Apr 1, 2021

I don't understand either @janissimsons. There seems to be resistance because of edge-cases, that does more harm then good.

@ajcvickers ajcvickers merged commit 80d52c5 into dotnet:main Apr 23, 2021
@riscie
Copy link
Author

riscie commented Apr 23, 2021

Thank you @ajcvickers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants