AnsweredAssumed Answered

Error while connecting a geodatabase through .sde file

Question asked by jha.surajkumar on Jan 5, 2018

i am trying to connect .sde file  created through ArcGIS Pro. I am using ArcGIS Pro SDK 2.0 for coding. My code is Geodatabase enterpriseGeodatabaseViaConnectionFile = new Geodatabase(new DatabaseConnectionFile(filepath))); but at run time i am getting the error  System.DllNotFoundException was unhandled   HResult=-2146233052   Message=Unable to load DLL 'CoreInterop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)   Source=ArcGIS.Core   TypeName=""   StackTrace:        at ArcGIS.Core.Internal.Interop.GetInterface(Guid& id, Object& obj)        at ArcGIS.Core.Internal.Interop.get_Geodatabase()        at ArcGIS.Core.Data.GeodatabaseUtil.OpenDatastore(String path)        at ArcGIS.Core.Data.Geodatabase.Open(Uri uri)        at ArcGIS.Core.Data.Geodatabase..ctor(DatabaseConnectionFile databaseConnectionFile)        at ESRIIndiaDataTranslator.ArcUtility.FileGdbWorkspaceFromPath(String path) in C:\Users\suraj.jha\Desktop\ESRIIndiaDataTranslator\ArcUtility.cs:line 47        at ESRIIndiaDataTranslator.Form1.cmbProcessType_SelectedIndexChanged(Object sender, EventArgs e) in C:\Users\suraj.jha\Desktop\ESRIIndiaDataTranslator\Form1.cs:line 97        at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)        at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)        at System.Windows.Forms.ComboBox.WndProc(Message& m)        at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)        at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)        at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)        at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)        at System.Windows.Forms.Control.WmCommand(Message& m)        at System.Windows.Forms.Control.WndProc(Message& m)        at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)        at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)        at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)        at System.Windows.Forms.Control.WmCommand(Message& m)        at System.Windows.Forms.Control.WndProc(Message& m)        at System.Windows.Forms.ComboBox.WndProc(Message& m)        at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)        at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)        at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)        at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)        at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)        at ESRIIndiaDataTranslator.Program.Main() in C:\Users\suraj.jha\Desktop\ESRIIndiaDataTranslator\Program.cs:line 23        at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)        at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)        at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()        at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)        at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)        at System.Threading.ThreadHelper.ThreadStart()   InnerException:  i have added ArcGIS.core.data namespace. Can any one have any idea why i am getting this error.

Outcomes