【解決】使用VS開發ArcGIS Engine報錯:未處理InvalidOperationException

添加axMapControl1控件運行後,報如下異常:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components.

解決辦法:

找到program.cs,把 ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop); 這句放到Application.SetCompatibleTextRenderingDefault(false); 和 Application.Run(new Form1()); 之間就好了。

 

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