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
Contributor

@riscie riscie commented Apr 30, 2020

… to the version mismatch error message

… to the version mismatch error message
@riscie
Copy link
Contributor Author

@riscie 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>

This comment has been minimized.

@smitpatel

smitpatel Apr 30, 2020
Member

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

This comment has been minimized.

@riscie

riscie Apr 30, 2020
Author Contributor

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?

This comment has been minimized.

@smitpatel

smitpatel Apr 30, 2020
Member

Having wrong command is worse than having no command.

This comment has been minimized.

@riscie

riscie Apr 30, 2020
Author Contributor

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

This comment has been minimized.

@ajcvickers

ajcvickers Apr 30, 2020
Member

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

This comment has been minimized.

@riscie

riscie May 1, 2020
Author Contributor

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

This comment has been minimized.

@ajcvickers

ajcvickers May 1, 2020
Member

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

This comment has been minimized.

@ntziolis

ntziolis May 11, 2020

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

This comment has been minimized.

@riscie

riscie Nov 3, 2020
Author Contributor

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 Jul 23, 2020
@janissimsons
Copy link

@janissimsons janissimsons commented Apr 1, 2021

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
Contributor Author

@riscie 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
7 checks passed
7 checks passed
@github-actions
build
Details
@azure-pipelines
efcore-ci Build #20200722.44 succeeded
Details
@azure-pipelines
efcore-ci (Build Helix) Build Helix succeeded
Details
@azure-pipelines
efcore-ci (Build Linux) Build Linux succeeded
Details
@azure-pipelines
efcore-ci (Build Windows) Build Windows succeeded
Details
@azure-pipelines
efcore-ci (Build macOS) Build macOS succeeded
Details
license/cla All CLA requirements met.
Details
@riscie
Copy link
Contributor Author

@riscie 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants