arcengine 10.2拿控件拖了一个主窗体,在program.cs 的程序入口里面添加了绑定engine+desktop的语句之后即
ArcGIS 10中有一个新的要求——runtime绑定。所谓runtime绑定,就是在任何ArcObjects代码(包括许可初始化代码)被执行之前,指定相称的ArcGIS产品——ArcGIS Desktop或者ArcGIS Engine应用程序。建立runtime绑定的APIs位于程序集ESRI.ArcGIS.Version的类ESRI.ArcGIS.RuntimeManager中,该程序集随着任何ArcGIS 10 runtime一起安装于全局程序集缓存(Global Assembly Cache (GAC))中。安装了ArcObjects .NET SDK,默认的,程序集ESRI.ArcGIS.Version位于C:\Program Files\ArcGIS\DeveloperKit10.0\DotNet文件夹下。可以在Visual Studio IDE中将该程序集添加为项目引用。
[C#]
//Insert this line before the Application.Run in the static void Main() method.
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine); 10中有一个新的要求——runtime绑定。所谓runtime绑定,就是在任何ArcObjects代码(包括许可初始化代码)被执行之前,指定相称的ArcGIS产品——ArcGIS Desktop或者ArcGIS Engine应用程序。建立runtime绑定的APIs位于程序集ESRI.ArcGIS.Version的类ESRI.ArcGIS.RuntimeManager中,该程序集随着任何ArcGIS 10 runtime一起安装于全局程序集缓存(Global Assembly Cache (GAC))中。安装了ArcObjects .NET SDK,默认的,程序集ESRI.ArcGIS.Version位于C:\Program Files\ArcGIS\DeveloperKit10.0\DotNet文件夹下。可以在Visual Studio IDE中将该程序集添加为项目引用。
[C#]
//Insert this line before the Application.Run in the static void Main() method.
ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Engine);
运行还是出现了如下错误,重新生成项目也没用
ArcGIS version not specified. You must call RuntimeManager.Bind before creating any ArcGIS
在网上查询才知道,还需要添加一个Reference:ESRI.ArcGIS.Version的引用
本文详细介绍了在ArcGIS10.2中如何实现runtime绑定,并提供了具体的C#代码示例。runtime绑定是在执行任何ArcObjects代码之前指定相应的ArcGIS产品的一种新要求。

1265

被折叠的 条评论
为什么被折叠?



