This project uses Entity Framework Core v6.0.7 and .NET Version 6.
When I try to add a migration or update the database from NuGet package manager console, I'm getting the following error:
add-migration "Test"Build started...Build succeeded.
System.TypeLoadException: Could not load type 'Microsoft.EntityFrameworkCore.Internal.DiagnosticsLogger`1' from assembly 'Microsoft.EntityFrameworkCore, Version=6.0.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
at Microsoft.EntityFrameworkCore.Design.DesignTimeServiceCollectionExtensions.AddEntityFrameworkDesignTimeServices(IServiceCollection services, IOperationReporter reporter, Func
1 applicationServiceProviderAccessor) at Microsoft.EntityFrameworkCore.Design.Internal.DesignTimeServicesBuilder.Build(DbContext context) at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType, String namespace) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType, String namespace) at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0.<.ctor>b__0() at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0
1.b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)Could not load type 'Microsoft.EntityFrameworkCore.Internal.DiagnosticsLogger`1' from assembly 'Microsoft.EntityFrameworkCore, Version=6.0.7.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
I've tried reinstalling the NuGet packages, clean and rebuild. Even deleted the contents of bin and obj folders before rebuild but error still appears.
I'm new to .NET Core framework. Greatly appreciate if anyone can help me with this.