VS 2022は移行コマンドを実行するとエラーが出ますが、VS 2019を使うとこれは普通のことです。
PM> EntityFramework\Add-Migration test Entity Framework 6.xとEntity Framework Coreの両方のコマンドがインストールされています。 Entity Framework 6バージョンが実行中です。 どの実行先かを選択するコマンドを完全に限定できます。EF6.xなら『EntityFramework\Add-Migration』、EF Coreなら『EntityFrameworkCore\Add-Migration』です。
System.ArgumentNullException: 值不能为 null。 パラメータ名:タイプ at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion) System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(プロジェクトプロジェクト)において System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(プロジェクトプロジェクト)で In System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory) In System.Data.Entity.Migrations.AddMigrationCommand.Execute(String name, Boolean force, Boolean ignoreChanges) System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)で 値はnullにはなりません。 パラメータ名:タイプ
|