Šis raksts ir mašīntulkošanas spoguļraksts, lūdzu, noklikšķiniet šeit, lai pārietu uz oriģinālo rakstu.

Skats: 31956|Atbildi: 0

[Avots] MySQL Entity Framework pamata izņēmuma risinājums

[Kopēt saiti]
Publicēts 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: metode 'get_Info' tipā 'MySql.Data.EntityFrameworkCore.Infraestructure.MySQLOptionsExtension' no montāžas 'MySql.Data.EntityFrameworkCore, Version=8.0.18.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' nav ieviešanas.
   vietnē Microsoft.EntityFrameworkCore.MySQLDbContextOptionsExtensions.UseMySQL
   Pie tā. WebUI.Startup. <ConfigureServices>b__4_0(DbContextOptionsBuilder opt) C:\Users\DELL\source\repos\itsvse\itsvse. WebUI\Startup.cs:39. rinda
   vietnē Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass3_0'2. <AddDbContextPool>b__0(IServiceProvider _, DbContextOptionsBuilder ob)
   vietnē Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass5_0'2. <AddDbContextPool>b__0(IServiceProvider sp, DbContextOptionsBuilder ob)
   vietnē Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action'2 optionsAction)
   vietnē Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass10_0'1. <AddCoreServices>b__0(IServiceProvider p)
   vietnē Autofac.Extensions.DependencyInjection.AutofacRegistration.<>c__DisplayClass3_0. <Register>b__0(IComponentContext context, IEnumerable'1 parametri)
   Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable'1 parametri)
   vietnē Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable'1 parameters, Object& decoratorTarget)
   --- Iekšējās izņēmumu steka izsekošanas --- beigas
   vietnē Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable'1 parameters, Object& decoratorTarget)
   vietnē Autofac.Core.Resolving.InstanceLookup.Execute()
   vietnē Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable'1 parametri)
   vietnē Autofac.Core.Resolving.ResolveOperation.ResolveComponent(IComponentRegistration registration, IEnumerable'1 parametri)
   vietnē Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable'1 parametri)
   vietnē Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(IComponentRegistration registration, IEnumerable'1 parametri)
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable'1 parameters, Object& instance)
   pie Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable'1 parametri)
   pie Autofac.ResolutionExtensions.Resolve(IComponentContext konteksts, Tips serviceType, IEnumerable'1 parametri)
   vietnē Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType)
   vietnē Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Ierakstiet serviceType)
   vietnē Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider nodrošinātājs, ierakstiet serviceType)
   vietnē Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider nodrošinātājs)
   vietnē Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetServices[T](IServiceProvider nodrošinātājs)
   vietnē Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextTypes()
   vietnē Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.FindContextType(String name)
   vietnē Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   vietnē Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.AddMigration(String name, String outputDir, String contextType)
   vietnē Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigrationImpl(String name, String outputDir, String contextType)
   vietnē Microsoft.EntityFrameworkCore.Design.OperationExecutor.AddMigration.<>c__DisplayClass0_0. <.ctor>b__0()
   vietnē Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0'1. <Execute>b__0()
   vietnē Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(darbības darbība)
Aktivizējot λ:Microsoft.EntityFrameworkCore.DbContextOptions[] -> λ:Microsoft.EntityFrameworkCore.DbContextOptions -> λ: Microsoft.EntityFrameworkCore.DbContextOptions'1[[itsvse. DomainModels.itsvseDb, itsvse. DomainModels, versija=1.0.0.0, kultūra=neitrāla, PublicKeyToken=null]].


Instalācijas sākumā bija:



Vēlāk tika uzstādīts




Galīgais risinājums, instalējiet šādu versiju:







Iepriekšējo:EF Core bedre: DbContextPool izraisa datu bāzes savienojuma pūla savienojuma izsmelšanu
Nākamo:[Tang dinastijas ārzemju civilizācija].Rakstīja Schaefer. (Douban 9.0 punkti) .PDF
Atruna:
Visa programmatūra, programmēšanas materiāli vai raksti, ko publicē Code Farmer Network, ir paredzēti tikai mācību un pētniecības mērķiem; Iepriekš minēto saturu nedrīkst izmantot komerciāliem vai nelikumīgiem mērķiem, pretējā gadījumā lietotājiem ir jāuzņemas visas sekas. Informācija šajā vietnē nāk no interneta, un autortiesību strīdiem nav nekāda sakara ar šo vietni. Iepriekš minētais saturs ir pilnībā jāizdzēš no datora 24 stundu laikā pēc lejupielādes. Ja jums patīk programma, lūdzu, atbalstiet oriģinālu programmatūru, iegādājieties reģistrāciju un iegūstiet labākus oriģinālus pakalpojumus. Ja ir kādi pārkāpumi, lūdzu, sazinieties ar mums pa e-pastu.

Mail To:help@itsvse.com