[英]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.