ASP.NET Core 3.0のプレビュー版でmigrationしようとしたらうまくいかなかったときの対処法
現象
dotnet-ef migrations add initial-migration
このmigration用のコマンドを実行しようとするとこんなことを言われる
The application to execute does not exist: 'hogehoge\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062\dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.
原因はCore 3.0で実行してるのにEntityFrameworkのCore 2.2のほうを実行しようとしてるから(だと思う)
対処法
古いほうをアンインストールしてからCore3.0版をインストールする
dotnet tool uninstall dotnet-ef --global dotnet tool install --global dotnet-ef --version 3.0.0-*