VS 2022 vil gi en feil når migreringskommandoen kjøres, noe som er normalt når man bruker VS 2019.
PM> EntityFramework\Add-Migration test Både Entity Framework 6.x og Entity Framework Core-kommandoene er installert. Entity Framework 6-versjonen kjøres. Du kan fullt ut kvalifisere kommandoen for å velge hvilken som skal kjøres, 'EntityFramework\Add-Migration' for EF6.x og 'EntityFrameworkCore\Add-Migration' for EF Core.
System.ArgumentNullException: 值不能为 null。 Parameternavn: 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) på System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetProjectTypes(Project project, Int32 shellVersion) I System.Data.Entity.Migrations.Extensions.ProjectExtensions.IsWebSiteProject(Project project) I System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetTargetDir(Project project) I System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, boolsk useContextWorkingDirectory) I System.Data.Entity.Migrations.AddMigrationCommand.Execute(Strengnavn, Boolean force, Boolean ignoreChanges) I System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action-kommandoen) Verdien kan ikke være null. Parameternavn: type
|