ArcGIS engine 运行报错: ArcGIS version not specified.解决办法
2014-09-23 14:37
162 查看
然后单击F5运行程序,这个时候程序报错,出现下面所示的错误:
ArcGIS version not specified. You must call RuntimeManager.Bindbefore creating any ArcGIS components.
问题解决方案:
在系统的入口添加下面的一行代码:
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
当然上面这样代码也可以添加到其他的适合的位置,本人感觉放到程序的入口最合适
这里还需要添加一个Reference:ESRI.ArcGIS.Version
完整的参考代码如下所示:
ArcGIS version not specified. You must call RuntimeManager.Bindbefore creating any ArcGIS components.
问题解决方案:
在系统的入口添加下面的一行代码:
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
当然上面这样代码也可以添加到其他的适合的位置,本人感觉放到程序的入口最合适
这里还需要添加一个Reference:ESRI.ArcGIS.Version
完整的参考代码如下所示:
using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace WindowsFormsApplication1 { static classProgram { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } } }
相关文章推荐
- 搭建ArcGIS Engine开发环境时,Visual studio中丢失ArcGIS模板的解决办法
- ArcGIS Runtime SDK for Java 运行时找不到相关类解决办法
- MapReduce打包程序运行错误——Unsupported major.minor version 51.0解决办法
- archlinux下java运行时错误/usr/lib/libstdc++.so.5: version `CXXABI_1.2' not found的解决办法
- arcgis安装msi安装包提示"在未标记为正在运行时,调用了RunScript”解决办法
- Unsupported major.minor version 51.0解决办法 ——运行MapReduce程序找不到相关类——MapReduce中的Reduce无效
- ArcGIS Engine 10报错:ArcGIS version not specified...
- 运行ant的javac命令时报错:Unsupported major.minor version 51.0 时抛出异常的解决办法
- MyEclipse Tomcat运行时出现Bad Version in .class file解决办法
- win8 运行ArcGis Server Manager 报500.19错解决办法
- 在windows2003server上运行asp程序,发生验证码看不到,文件找不到等错误的解决办法
- apache 2.2.2 + PHP5.1.4 不能运行的解决办法.
- Virtual PC在PAE模式下无法运行解决办法
- “Visual Studio .NET 已检测到指定的 Web 服务器运行的不是 ASP.NET 1.1 版...”问题的解决办法
- "VS.NET Web服务器运行的不是ASP.NET 1.1 版"的解决办法
- VS.NET Web服务器运行的不是ASP.NET 1.1 版"的解决办法
- “Visual Studio .NET 已检测到指定的 Web 服务器运行的不是 ASP.NET 1.1 版...”问题的解决办法
- “试图运行项目时出错:无法在 web 服务器上启动调试。” 的解决办法
- 试图运行项目时出错:无法在web服务器上启动项目得解决办法
- 运行cl.exe编译发生:没有找到 mspdb80.dll 的解决办法