为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:dm8_20220519_x86_win_64_ent
【操作系统】:Windows 10
【CPU】: intel
【问题描述】*: 使用 Microsoft.EntityFrameworkCore.Dm从数据库反向工程创建实体总是报错,错误如下:
PM> dotnet ef dbcontext scaffold “server=192.168.0.120;port=5236;schema=TESTDB1;user=SYSDBA;password=pass” Microsoft.EntityFrameworkCore.Dm
Build started…
Build succeeded.
System.InvalidOperationException: Unable to resolve service for type ‘Microsoft.EntityFrameworkCore.Diagnostics.LoggingDefinitions’ while attempting to activate ‘Microsoft.EntityFrameworkCore.Internal.DiagnosticsLogger`1[Microsoft.EntityFrameworkCore.DbLoggerCategory+Scaffolding]’.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain, Int32 slot, Boolean throwOnConstraintViolation)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateOpenGeneric(Type serviceType, CallSiteChain callSiteChain)
同问