Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Cannot add migrations in Entity Framework Core v6.0.7 .NET 6 - could not load type 'Microsoft.EntityFrameworkCore.Internal.DiagnosticsLogger

$
0
0

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, Func1 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_01.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.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>