解决方案编译通过,运行web程序时报错不知道什么原因
System.ArgumentException
HResult=0x80070057
Message=Could not load the SqlServerDatabaseProvider DbProviderFactory.
Source=PetaPoco
StackTrace:
at PetaPoco.Core.DatabaseProvider.GetFactory(String[] assemblyQualifiedNames)
at PetaPoco.Providers.SqlServerDatabaseProvider.GetFactory()
at PetaPoco.Database.Initialise(IProvider provider, IMapper mapper)
at PetaPoco.Database..ctor(IDatabaseBuildConfiguration configuration)
at Xms.Data.DbContext..ctor(IDataProviderOptions options) in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\DbContext.cs:line 17
at Xms.Data.Provider.DataProvider1.get_DbContext() in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\Provider\DataProvider.cs:line 55 at Xms.Data.Provider.DataProvider1.get_DataBase() in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\Provider\DataProvider.cs:line 82
at Xms.Data.Provider.DataProvider1.Query(IExecuteContext1 context) in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\Provider\DataProvider.cs:line 242
at Xms.Data.DataRepositoryBase1.Query(QueryDescriptor1 q) in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\DataRepositoryBase.cs:line 270
at Xms.Module.Data.ModuleRepository.Query(QueryDescriptor1 q) in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\Data\ModuleRepository.cs:line 112 at Xms.Module.ModuleService.Query(Func2 container) in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\ModuleService.cs:line 77
at Xms.Module.ModuleRegistrar.RegisterAll() in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\ModuleRegistrar.cs:line 24
at Xms.Module.ModuleRegistrarServiceExtensions.RegisterModules(IServiceCollection services) in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\ModuleRegistrar.cs:line 69
at Xms.Web.Startup.ConfigureServices(IServiceCollection services) in E:\MyProject\xmsProject\Presentation\Xms.Web\Startup.cs:line 34
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>cDisplayClass9_0.gStartup|0(IServiceCollection serviceCollection)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>cDisplayClass8_0.b0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.b__0(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Xms.Web.Program.Main(String[] args) in E:\MyProject\xmsProject\Presentation\Xms.Web\Program.cs:line 13
解决方案编译通过,运行web程序时报错不知道什么原因 System.ArgumentException HResult=0x80070057 Message=Could not load the SqlServerDatabaseProvider DbProviderFactory. Source=PetaPoco StackTrace: at PetaPoco.Core.DatabaseProvider.GetFactory(String[] assemblyQualifiedNames) at PetaPoco.Providers.SqlServerDatabaseProvider.GetFactory() at PetaPoco.Database.Initialise(IProvider provider, IMapper mapper) at PetaPoco.Database..ctor(IDatabaseBuildConfiguration configuration) at Xms.Data.DbContext..ctor(IDataProviderOptions options) in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\DbContext.cs:line 17 at Xms.Data.Provider.DataProvidergStartup|0(IServiceCollection serviceCollection)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.Invoke(Object instance, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>cDisplayClass8_0.b 0(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.UseStartup(Type startupType, HostBuilderContext context, IServiceCollection services)
at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass12_0.b__0(HostBuilderContext context, IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at Xms.Web.Program.Main(String[] args) in E:\MyProject\xmsProject\Presentation\Xms.Web\Program.cs:line 13
1.get_DbContext() in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\Provider\DataProvider.cs:line 55 at Xms.Data.Provider.DataProvider
1.get_DataBase() in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\Provider\DataProvider.cs:line 82 at Xms.Data.Provider.DataProvider1.Query(IExecuteContext
1 context) in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\Provider\DataProvider.cs:line 242 at Xms.Data.DataRepositoryBase1.Query(QueryDescriptor
1 q) in E:\MyProject\xmsProject\Libraries\DataCore\Xms.Data\DataRepositoryBase.cs:line 270 at Xms.Module.Data.ModuleRepository.Query(QueryDescriptor1 q) in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\Data\ModuleRepository.cs:line 112 at Xms.Module.ModuleService.Query(Func
2 container) in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\ModuleService.cs:line 77 at Xms.Module.ModuleRegistrar.RegisterAll() in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\ModuleRegistrar.cs:line 24 at Xms.Module.ModuleRegistrarServiceExtensions.RegisterModules(IServiceCollection services) in E:\MyProject\xmsProject\Libraries\Module\Xms.Module\ModuleRegistrar.cs:line 69 at Xms.Web.Startup.ConfigureServices(IServiceCollection services) in E:\MyProject\xmsProject\Presentation\Xms.Web\Startup.cs:line 34 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.InvokeCore(Object instance, IServiceCollection services) at Microsoft.AspNetCore.Hosting.ConfigureServicesBuilder.<>cDisplayClass9_0.