![](/img/trans.png)
[英]Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error in C# application
[英]Jenkins build with Access DataBase Engine on C# for Selenium Tests,Getting Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
对于我的硒Nnuint测试,Access数据库引擎用于从Excel工作表中读取数据。虽然这些测试是从Jenkins运行的,但我却得到了以下错误消息。
Invalid : Automation_Smoke_Tests.CategoryExecution.CategorybaseExcetion
System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
----> System.InvalidOperationException : The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at NUnit.Framework.TestCaseSourceAttribute.GetTestCaseSource(IMethodInfo method) in C:\src\nunit\nunit\src\NUnitFramework\framework\Attributes\TestCaseSourceAttribute.cs:line 277
at NUnit.Framework.TestCaseSourceAttribute.GetTestCasesFor(IMethodInfo method) in C:\src\nunit\nunit\src\NUnitFramework\framework\Attributes\TestCaseSourceAttribute.cs:line 173
--InvalidOperationException
at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at LinqToExcel.Query.ExcelUtilities.GetWorksheetNames(ExcelQueryArgs args)
at LinqToExcel.ExcelQueryFactory.GetWorksheetNames()
我实际上现在遇到了类似的问题。 托管Jenkins服务器的计算机似乎未安装正确的访问引擎。
我发现必须安装2010版本。 这对我来说很有趣。 访问引擎有2个版本-常规版本和x64版本。 我必须安装NON x64版本,因此我的测试可以在Visual Studio中本地运行,但是要使其在Jenkins中执行,则需要x64版本。
您应该可以在这里找到2010年的下载内容-https: //www.microsoft.com/zh-cn/download/details.aspx?id=13255 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.