ArcGIS10:ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS
[网络转载]
今天将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());
}
}
}
相关文章
- 1130 host is not allowed to connect to
- [Nagios] Error: Template 'timman' specified in contact definition could not be not found (c
- Formatting is Specified but argument is not IFormattable
- 报错:The specified datastore driver ("com.mysql.jdbc.Driver") was not found in the CLASSPATH. Please check your CLASSPATH specification, and the name of the driver.
- IIS出现The specified module could not be found解决方法
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource could
- Git Error: fatal: Cannot setup tracking information; starting point 'origin/bb' is not a branch.
- FlinkKafkaConsumer setting group.id not working properly when consuming
- 微信小程序:用 Promise 解决方案代替回调地狱。 修复 this._invokeMethod is not a function 的问题
- 解决多个python版本安装第三方库出现“...is not a supported wheel on this platform”
- AWS CloudFront CDN直接全站加速折腾记The request could not be satisfied. Bad request
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
- Can not evaluate the expression: Back-end (JVM) Internal error: Failed to generate expression: KtLam
- JMeter学习-006-Could not open/create prefs root node SoftwareJavaSoftPrefs at root 0x80000002 解决办法(windows 7)
- HTTP 404 Not Found Error with .woff or .woff2 Font Files
- 1449 - The user specified as a definer ('test'@'%') does not exist
- 解决"easy_install command not found"问题记录
- 创建springBoot项目及启动报错遇到的问题解决:Failed to configure a DataSource: 'url' attribute is not specified and no embedd
- Failed to configure a DataSource: ‘url‘ attribute is not specified and no .解决方法
- [Hibernate]Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
- The user specified as a definer ('root'@'%') does not exist
- 《 Keil MDK-Arm》__编译代码报错:Target uses ARM-Compiler ‘Default Compiler Version 5‘ which is not available
- SQLSERVER 交、并、差集,In,Not In,Exist,Not Exist的区别,四种连接(转载)
- eclipse指定JDK版本启动,解决version *** of the JVM is not suitable for this product.Version:*** 问题
- 8. 成功解决:Error: Module not specified