-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Conversation
… to the version mismatch error message
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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
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.
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. |
I don't understand either @janissimsons. There seems to be resistance because of edge-cases, that does more harm then good. |
Thank you @ajcvickers |
… to the version mismatch error message