VS 2022 geeft een foutmelding bij het uitvoeren van het migratiecommando, wat normaal is bij VS 2019.
PM> EntityFramework\Add-Migration test Zowel de commando's Entity Framework 6.x als Entity Framework Core zijn geïnstalleerd. De versie van Entity Framework 6 wordt uitgevoerd. Je kunt het commando volledig kwalificeren om te kiezen welke je moet uitvoeren, 'EntityFramework\Add-Migration' voor EF6.x en 'EntityFrameworkCore\Add-Migration' voor EF Core.
System.ArgumentNullException: 值不能为 null。 Parameternaam: type at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, Object[] args) op System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion) In System.Data.Entity.Migraties.Extensions.ProjectExtensions.IsWebSiteProject(Project project) In System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project) In System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory) In System.Data.Entity.Migrations.AddMigrationCommand.Execute(Stringnaam, Boolean force, Boolean ignoreChanges) In System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action-commando) De waarde kan niet nul zijn. Parameternaam: type
|