架构师_程序员_码农网

Retrieve password
Register

QQ登录

Just one step to get started

Search
View:20158|Reply: 0
打印 上一主题 下一主题

[Information]MySQL Entity Framework Core Exception Resolution

[Copy Link]
跳转到指定楼层
owner of the building
发表于 2019-11-18 15:39:21| 看该作者回帖奖励|Browse in reverse order|Read mode
System.TypeLoadException: "Method 'get_Info' in type 'Pomelo.EntityFrameworkCore.MySql.Infrastructure.Internal. MySqlOptionsExtension' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=2.2.6.0, Culture=neutral, PublicKeyToken=null' does not have an implementation."
System.TypeLoadException: "Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation."
Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Microsoft.EntityFrameworkCore.DbContextOptions[] -& gt; λ:Microsoft.EntityFrameworkCore.DbContextOptions -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[itsvse.DomainModels. itsvseDb, itsvse.DomainModels, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].
---> System.TypeLoadException: Method 'get_Info' in type 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' from assembly 'MySql.Data.EntityFrameworkCore, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' does not have an implementation.
at Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL
at itsvse.WebUI.Startup.<ConfigureServices>b__4_0(DbContextOptionsBuilder opt) in C:\Users\DELL\source\repos\itsvse\ itsvse.WebUI\Startup.cs:line 39
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass3_0`2.&lt ;AddDbContextPool>b__0(IServiceProvider _, DbContextOptionsBuilder ob)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass5_0`2.&lt ;AddDbContextPool>b__0(IServiceProvider sp, DbContextOptionsBuilder ob)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass10_0`1.& lt;AddCoreServices>b__0(IServiceProvider p)
at Autofac.Extensions.DependencyInjection.AutofacRegistration.<>c__DisplayClass3_0.<Register>b__0( IComponentContext context, IEnumerable`1 parameters)
at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters )
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget)
at Autofac.Core.Resolving.InstanceLookup.Execute()
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters)
at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider, Type serviceType)
GetRequiredService[T](IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider GetRequiredService[T](IServiceProvider)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetServices[T](IServiceProvider provider)
at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextTypes()
DbContextOperations.FindContextType(String name) at Microsoft.EntityFrameworkCore.Design.Internal.
DbContextOperations.CreateContext(String contextType) at Microsoft.EntityFrameworkCore.Design.Internal.
DbContextOperations.CreateContext(String contextType) at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType String name, String outputDir, String contextType )
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0.<.ctor>b__0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__ 0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
An exception was thrown while activating λ:Microsoft.EntityFrameworkCore.DbContextOptions[] -> λ:Microsoft.EntityFrameworkCore. DbContextOptions -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[itsvse.DomainModels.itsvseDb, itsvse.DomainModels, Version= 1.0.0.0, Culture=neutral, PublicKeyToken=null]].


The initial installation is



Later the installation was




Final solution, install the following version:







Previous article:EF Core small pitfalls: DbContextPool will cause the database connection pool connection exhaustion
Next: [Tang Dynasty of foreign civilizations]. Sheffer author. (Douban 9.0 points).PDF
The code farmer network, only published in the process of practice, encountered technical difficulties, do not mislead others.
You need to log in before you can post back Log in | Register

This version of the integral rules

DISCLAIMER:
All software, programming materials or articles published by Code Farmer are limited to be used for learning and research purposes only; the above contents shall not be used for commercial or illegal purposes, otherwise, all the consequences shall be borne by the users themselves. This site information from the network, copyright dispute has nothing to do with this site. You must completely remove the above content from your computer within 24 hours of downloading. If you like the program, please support the genuine software, buy registration and get better genuine service. If there is any infringement, please contact us by email to deal with it.

Mail To:help@itsvse.com

QQ| ( ICP备14021824号-2 )|Sitemap

GMT+8, 2024-9-18 20:14

Quick ReplyBack to topBack to list