当ArcEngine报事件同时存在于AxMapControl,MapControl时的解决方法(转载)
2008-04-17 16:09
531 查看
开发环境:VS.Net 2005(C#)
AE版本:9.2 sp4
报错的内容:
The type 'ESRI.ArcGIS.MapControl.IMapControlEvents2_OnOleDropEventHandler' exists in both 'e:\Program Files\ArcGIS\DotNet\ESRI.ArcGIS.MapControl.dll' and 'e:\ProgramFiles\ArcGIS\DotNet\ESRI.ArcGIS.AxMapControl.dll'
解决方法:
1. In VS.NET 2005, go to your project's References folder in Solution Explorer. Select ESRI.ArcGIS.AxMapControl or ESRI.ArcGIS.MapControl. In the Properties Pane, change Aliases from global to global, MapControlAlias.
将AxMapControl,MapControl都加入到引用中,修改ESRI.ArcGis.AxMapControl引用的属性,修改其Aliases(别名)由"global" to "global, MapControlAlias";
2. In your code at the first line in the file add: extern alias MapControlAlias;
在其他命名空间之前添加extern alias MapControlAlias;
3. Add alias to your ambiguous call. Ex. this.axMapControl1.OnMouseMove += new MapControlAlias::ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMouseMoveEventHandler(this.axMapControl1_OnMouseMove);
在冲突的地方,加上别名::想要调用的对象
This should work, don't worry about trying to do commandline /references as I couldn't figure it out, but the Properties Alias worked.
修改后,如下:
引用代码:
extern alias MapControlAlias;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.DataSourcesRaster;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
类中代码:
this.axMapControl1.OnMouseMove += new MapControlAlias::ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMouseMoveEventHandler(this.axMapControl1_OnMouseMove);
this.axMapControl1.OnAfterDraw += new MapControlAlias::ESRI.ArcGIS.MapControl.IMapControlEvents2_OnAfterDrawEventHandler(this.axMapControl1_OnAfterDraw);
来源于:http://forums.esri.com/thread.asp?c=159&f=1707&t=171978&mc=6
AE版本:9.2 sp4
报错的内容:
The type 'ESRI.ArcGIS.MapControl.IMapControlEvents2_OnOleDropEventHandler' exists in both 'e:\Program Files\ArcGIS\DotNet\ESRI.ArcGIS.MapControl.dll' and 'e:\ProgramFiles\ArcGIS\DotNet\ESRI.ArcGIS.AxMapControl.dll'
解决方法:
1. In VS.NET 2005, go to your project's References folder in Solution Explorer. Select ESRI.ArcGIS.AxMapControl or ESRI.ArcGIS.MapControl. In the Properties Pane, change Aliases from global to global, MapControlAlias.
将AxMapControl,MapControl都加入到引用中,修改ESRI.ArcGis.AxMapControl引用的属性,修改其Aliases(别名)由"global" to "global, MapControlAlias";
2. In your code at the first line in the file add: extern alias MapControlAlias;
在其他命名空间之前添加extern alias MapControlAlias;
3. Add alias to your ambiguous call. Ex. this.axMapControl1.OnMouseMove += new MapControlAlias::ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMouseMoveEventHandler(this.axMapControl1_OnMouseMove);
在冲突的地方,加上别名::想要调用的对象
This should work, don't worry about trying to do commandline /references as I couldn't figure it out, but the Properties Alias worked.
修改后,如下:
引用代码:
extern alias MapControlAlias;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.DataSourcesFile;
using ESRI.ArcGIS.DataSourcesRaster;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
类中代码:
this.axMapControl1.OnMouseMove += new MapControlAlias::ESRI.ArcGIS.MapControl.IMapControlEvents2_OnMouseMoveEventHandler(this.axMapControl1_OnMouseMove);
this.axMapControl1.OnAfterDraw += new MapControlAlias::ESRI.ArcGIS.MapControl.IMapControlEvents2_OnAfterDrawEventHandler(this.axMapControl1_OnAfterDraw);
来源于:http://forums.esri.com/thread.asp?c=159&f=1707&t=171978&mc=6
相关文章推荐
- vs2003转vs2005(C#),ArcEngine报事件同时存在于AxMapControl,MapControl出错(转)
- AxMapControl与MapControl冲突及IMapControlEvents2_OnMouseDownEventHandler错误的解决方法
- "类型同时存在于ESRI.ArcGIS.AxMapControl.dll和ESRI.ArcGIS.MapControl.dll中"的错误
- ArcEngine中实现axMapControl控件鼠标左击右击响应不同事件
- ArcEngine开发过程中遇到axToolbarControl添加item变灰无法使用的解决方法总结
- ajax跨域jsonp并且post请求No 'Access-Control-Allow-Origin'以及执行error时readyState=4同时status=200的解决方法
- 发布网站时出现 “同时存在于“c:"WINDOWS"Microsoft.NET"Framework"v2.0.50727"Temporary ”错误解决方法
- arcengine中按照图层名查询axMapControl和axPageLayoutControl中图层
- 移动端触发touch事件同时触发click事件的相关解决方法
- 发布网站时出现 “同时存在于“c:"WINDOWS"Microsoft.NET"Framework"v2.0.50727"Temporary ”错误解决方法
- 当子级元素浮动时让父级元素高度自适应的三种方法(以及多个子集元素同时存在浮动和绝对定位时的问题的解决办法)
- 关于百度富文本编辑器ueditor的.NET版本地图片上传提示uploader类同时存在于两个dll中的解决方法
- 关于百度富文本编辑器ueditor的.NET版本地图片上传提示uploader类同时存在于两个dll中的解决方法
- MySQL中同时存在创建和上次更新时间戳字段解决方法浅析;MYSQL日期 字符串 时间戳互转
- MapView Control 无法获取窗口控件句柄解决方法
- ArcEngine在AxMapControl上绘制
- MySQL中同时存在创建和上次更新时间戳字段解决方法浅析
- Glide .centerCrop() 和transform圆角图片不能同时存在解决方法
- ListView同时相应长按点击事件和单击事件的解决方法
- MySQL中同时存在创建和上次更新时间戳字段解决方法浅析