Arcgis9.3升級到10.1過程中錯誤“無法加載 DLL,ArcGISVersion.dll: 找不到指定的模塊”解決方案

原文地址:http://blog.csdn.net/liminled/article/details/8895979



原始項目使用Arcgis9.3,由於工作需要,計劃使用Arcgis10.1,在升級Arcgis的過程中,遇到了“無法加載DLL,ArcGISVersion.dll”的錯誤。

錯誤描述:

A first chance exceptionof type 'System.DllNotFoundException' occurred in ESRI.ArcGIS.Version.dll

An unhandled exception oftype 'System.DllNotFoundException' occurred in ESRI.ArcGIS.Version.dll

Additional information:無法加載 DLL“ArcGISVersion.dll”: 找不到指定的模塊。 (異常來自 HRESULT:0x8007007E)。


解決方案:


1.Remove the reference to the originalESRI.ArcGIS.ADF assembly.Add a reference to the ESRI.ArcGIS.ADF.Localassembly.

2.Remove the references to any of theoriginal assemblies for individual controls (AxMapControl, AxTOCControl,and so on.Add a reference to the ESRI.ArcGIS.AxControls assembly.

3.Set ESRI assemblies Specific Version property



4、若Solution中存在多個Project,需要在每個Project中添加ESRI.ArcGIS.Version.dll


5、設置project的properties的build的“platform target”爲x86.



在完成以上五步後,編譯工程,將報“ArcGIS Version not specified”的錯誤。這時在工程的Main函數開頭


6.使用licensecontrol設置許可,就不會出現ArcGIS Versionnot specified....的問題了。

//Insert this line before the Application.Run in thestatic void Main() method.

       ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);

[csharp] view plaincopy
  1. <span style="color:#333333;"static void Main()  
  2.         {  
  3.             <span style="color:#FF0000;">ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);</span>  
  4.             Application.EnableVisualStyles();  
  5.     ..........  
  6.         }</span>  


ArcGIS官網參考信息地址

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章