VS 2022 affichera une erreur lors de l’exécution de la commande de migration, ce qui est normal avec VS 2019.
PM > Test EntityFramework\Add-Migration Les commandes Entity Framework 6.x et Entity Framework Core sont toutes deux installées. La version Entity Framework 6 est en cours d’exécution. Vous pouvez entièrement qualifier la commande pour choisir laquelle exécuter, « EntityFramework\Add-Migration » pour EF6.x et « EntityFrameworkCore\Add-Migration » pour EF Core.
System.ArgumentNullException: 值不能为 null。 Nom du paramètre : type at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) sur System.Activator.CreateInstance(Type type, Object[] args) sur System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion) Dans System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(projet de projet) Dans System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(projet projet) Dans System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(StringConfigurationTypeName, boolean useContextWorkingDirectory) Dans System.Data.Entity.Migrations.AddMigrationCommand.Execute(Nom de chaîne, force booléenne, ignoreChanges booléen) Dans System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action commande) La valeur ne peut pas être nulle. Nom du paramètre : type
|