[网络转载]

今天将ArcGIS系列的软件从ArcGIS9.3.1升级到ArcGIS10,然后就使用VS创建一个简单的AE应用程序,然后拖放一个toolbar、LicenseControl以及MapControl控件。

接着编译应用程序,编译成功。

然后单击F5运行程序,这个时候程序报错,出现下面所示的错误:

ArcGIS version not specified. You must call RuntimeManager.Bind before 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 class Program
    {
        /// <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());
        }
    }
}

ArcGIS10:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS的更多相关文章

  1. ArcGIS10+:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS

    ArcGIS10+版本,使用VS创建一个简单的AE应用程序,然后拖放一个toolbar.LicenseControl以及MapControl控件. 接着编译应用程序,编译成功. 然后单击F5运行程序, ...

  2. 提示:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components.错误

    ArcGIS10,然后就使用VS创建一个简单的AE应用程序,然后拖放一个toolbar.LicenseControl以及MapControl控件. 接着编译应用程序,编译成功. 然后单击F5运行程序, ...

  3. VS开发ArcEngine时的一个异常信息——“ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components.”

    问题描述:程序报错“ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS ...

  4. ArcEngine10:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS components.

    在Program.cs中添加ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);如下 static voi ...

  5. ArcGIS: version not specified. You must call RuntimeManager.Bind before creat

    打开program.cs把ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);这句放到Applicatio ...

  6. ArcGIS version not specified.

    问题 在调用arcgis10 的ISurface用来取指定航线的地形时,这段代码在加载.dem时总是出错. 报: Fail to open raster dataset 解决方法: 在窗体中加载Map ...

  7. WPF开发ArcGis系统时的异常信息: ArcGIS product not specified. You must first bind to an ArcGIS version prior to using any ArcGIS components.

    “System.Runtime.InteropServices.COMException”类型的未经处理的异常在 Arcgis_Test.exe 中发生 其他信息: ArcGIS product no ...

  8. ArcObject开发,“异常在 ESRI.ArcGIS.Version.dll”错误

    “System.DllNotFoundException”类型的未经处理的异常在 ESRI.ArcGIS.Version.dll 中发生 其他信息: 无法加载 DLL“ArcGISVersion.dl ...

  9. “System.Runtime.InteropServices.COMException”类型的第一次机会异常在 ESRI.ArcGIS.Version.dll 中发生

    “System.Runtime.InteropServices.COMException”类型的第一次机会异常在 ESRI.ArcGIS.Version.dll 中发生 其他信息: The speci ...

随机推荐

  1. Linux安装ftp服务-详细步骤

    最近项目中用到了FTP服务器,于是整理了一份在Linux服务器上安装FTP的详细步骤供大家分享. 1.首先连接上自己的Linux服务器.我的Linux是CentOS 6 2.检查Linux服务器上是否 ...

  2. go cap和len的区别

    首先要搞清楚容量和长度的区别:   容量是指底层数组的大小,长度指可以使用的大小   容量的用处在哪?在与当你用 appen d扩展长度时,如果新的长度小于容量,不会更换底层数组,否则,go 会新申请 ...

  3. function_use

    # 函数说明文档,help(len) def sum1(a, b): """ 求和函数sum1 :param a: 参数1 :param b: 参数2 :return: ...

  4. Ansible-Tower使用文档

    导航栏介绍 # viewes Dashboard 仪表盘展示信息的 Jobs 跑过的任务记录 Schedules 计划任务 My View 查看用户的工作模版,和任务记录 # resources Te ...

  5. IIS搭建负载均衡WebFarm+Arr

    本文所述仅针对IIS7.0或更高版本 一.IIS简介 IIS( Internet Information Services),微软官方Windows平台上面web容器服务.支持http协议和ftp协议 ...

  6. Prometheus的查询语法是PromQL基本语法

    PromQL(Prometheus Query Language)是 Prometheus 自己开发的表达式语言,语言表现力很丰富,内置函数也很多.使用它可以对时序数据进行筛选和聚合. 1- Prom ...

  7. 浏览器console控制台不显示编译错误/警告

    浏览器正常显示报错应该是这样的 ,但是我一不小心右键给Hide message from...了,红色报错字体就没了,解决方法如下: 直接将红色框内的内容叉掉,恢复成filter就OK了

  8. nginx反向代理(1)

    目录 反向代理 概述 nginx代理 proxy_pass 加与不加/ ================================================================ ...

  9. 启动zabbix-server/agent报错:cannot open "/etc/zabbix/logs/zabbix_server.log": [13] Permission denied

    注:该报错解决方式同样适用于zabbix-agent 启动zabbix-server报错信息如下: 2月 27 16:52:44 localhost.localdomain zabbix_server ...

  10. selenium--find_element_by_xpath()方法汇总

    一.从根目录/开始 有点像Linux的文件查看,/代表根目录,一级一级的查找,直接子节点,相当于css_selector中的>号/html/body/div/p 二.根据元素属性选择: 查找具体 ...