I have a Blazor app that I've been developing for a while, and wanted to add a migration. Done this plenty of times before, so didn't expect anything unusual.
Ha, this is Microsoft, expect the unexpected!
Instead of the usual success, I saw the following exception...
The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: System.Management.Automation.RemoteException
Doesn't mean a lot to me!
I add migrations and update the database in a terminal window in Visual studio. This normally works fine, but it turned out here that this error was a Powershell wrapper error, the real EF Core error was hidden underneath it. To see the actual problem, I had to run the migration command directly in a terminal. That showed the full output....
System.MissingMethodException: Method not found: 'System.String Microsoft.EntityFrameworkCore.Diagnostics.AbstractionsStrings.ArgumentIsEmpty(System.Object)'. at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName) at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType, String namespace) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action) Method not found: 'System.String Microsoft.EntityFrameworkCore.Diagnostics.AbstractionsStrings.ArgumentIsEmpty(System.Object)'.
Still doesn't mean a lot to me!
After running down several rabbit holes for a while, I had a look in the EF Core GitHub issues, and found this one...
Announcement: Microsoft.EntityFrameworkCore.Tools 10.0.6 - Design package dependency change.
The bottom line is that Microsoft.EntityFrameworkCore.Design was previously brought in as a transitive dependency, and so always matched the version of Microsoft.EntityFrameworkCore.Tools (which brought it in). Since version 10.0.6, the transitive dependency was dropped, and so Nuget was resolving an old version of the package.
The solution: Add an explicit reference to Microsoft.EntityFrameworkCore.Design, making sure that the version matches the version of all the other EF Core packages and all will be well.
What a waste of time!

Wow... it worked, thanks! 😭
😒Classic entity framework core team...
Thanks a lot, it worked!
Great that they announce these things, but who ever reads those announcements? Thanks for posting, save me ages.