Bu makale makine çevirisi ayna makalesidir, orijinal makaleye geçmek için lütfen buraya tıklayın.

Görünüm: 31956|Yanıt: 0

[Kaynak] MySQL Entity Framework Core istisna çözüm

[Bağlantıyı kopyala]
Yayınlandı 18.11.2019 15:39:21 | | |
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[] -> λ:Microsoft.EntityFrameworkCore.DbContextOptions -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[itsvse.DomainModels.itsvseDb, itsvse.DomainModels, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].
---> System.TypeLoadException: 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' tipinde 'MySql.Data.EntityFrameworkCore' assembly 'get_Info MySql.Data.EntityFrameworkCore'dan, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' bir uygulamaya sahip değildir.
   at Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL
   itsvse'de. WebUI.Startup. <ConfigureServices>b__4_0(DbContextOptionsBuilder opt) C:\Users\DELL\source\repos\itsvse\itsvse içinde. WebUI\Startup.cs:line 39
   at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass3_0'2. <AddDbContextPool>b__0(IServiceProvider _, DbContextOptionsBuilder ob)
   Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass5_0'2 adresinde bulunuyor. <AddDbContextPool>b__0(IServiceProvider sp, DbContextOptionsBuilder ob)
   at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action'2 seçenekleriAction)
   Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass10_0'1 adresinde yer almaktadır. <AddCoreServices>b__0(IServiceProvider p)
   Autofac.Extensions.DependencyInjection.AutofacRegistration.<>c__DisplayClass3_0 adresinde bulunuyor. <Register>b__0(IComponentContext context, IEnumerable'1 parametreler)
   at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable'1 parameters)
   at Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable'1 parameters, Object&decoratorTarget)
   --- İç istisna yığını izinin sonu ---
   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 parametreleri)
   at Autofac.Core.Resolving.ResolveOperation.ResolveComponent(IComponentRegistration registration, IEnumerable'1 parametreleri)
   at Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable'1 parametreler)
   at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable'1 parametreleri)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable'1 parameters, Object&instance)
   at Autofac.ResolutionExtensions.ResolveService (IComponentContext context, Service service, IEnumerable'1 parametreler)
   at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable'1 parameters)
   at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
   Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Tip serviceType) adresinde.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetServices[T](IServiceProvider provider) adresinde
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextTypes()
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextType(String name)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(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)
λ:Microsoft.EntityFrameworkCore.DbContextOptions[] etkinleştirilirken bir istisna atıldı -> λ:Microsoft.EntityFrameworkCore.DbContextOptions -> λ: Microsoft.EntityFrameworkCore.DbContextOptions'1[[itsvse. DomainModels.itsvseDb, itsvse. DomainModels, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].


Kurulumun başında şunlardı:



Daha sonra kurulan




Son çözüm, aşağıdaki sürümü kurmaktır:







Önceki:EF Core pit: DbContextPool veritabanı bağlantı havuzu bağlantısının tükenmesine neden oluyor
Önümüzdeki:[Tang Hanedanı'nın Yabancı Uygarlığı]. Schaefer tarafından yazıldı. (Douban 9.0 puan) .PDF
Feragatname:
Code Farmer Network tarafından yayımlanan tüm yazılım, programlama materyalleri veya makaleler yalnızca öğrenme ve araştırma amaçları içindir; Yukarıdaki içerik ticari veya yasa dışı amaçlarla kullanılamaz, aksi takdirde kullanıcılar tüm sonuçları ödemelidir. Bu sitedeki bilgiler internetten alınmakta olup, telif hakkı anlaşmazlıklarının bu siteyle hiçbir ilgisi yoktur. Yukarıdaki içeriği indirmeden sonraki 24 saat içinde bilgisayarınızdan tamamen silmelisiniz. Programı beğendiyseniz, lütfen orijinal yazılımı destekleyin, kayıt satın alın ve daha iyi orijinal hizmetler alın. Herhangi bir ihlal olursa, lütfen bizimle e-posta yoluyla iletişime geçin.

Mail To:help@itsvse.com