ArcEngine10在VS2010中编译.net framework 3.5版本问题

问题描述:

      前段时间装了个VS2010,用ArcEngine10VS2010中基于.Net Framework 3.5新建一个MapControl Application工程,创建过程如下:

1. Start Visual Studios 2010.

2. Select New Project….

3. Expand ArcGIS->Extending ArcObjects and select MapControl Application for Visual C# using the .NET Framework 3.5 and enter Project Name and OK.

4. This starts a new project list items (Properties, References, .cs code, etc) automatically added to the Solution Explorer.

5. At this point, I can Build the project either under DEBUG or RELEASE modes and using the x86 Solution Platform. and run the Project w/ or w/o Debugging and I get the basic, empty MapControl Application. Data can be loaded or .MXD files loaded w/o a problem

但是程序一运行便出类似以下的错误:

Error    1    未能加载文件或程序集“file:///C:/Program Files (x86)/ArcGIS/DeveloperKit10.0/DotNet/ESRI.ArcGIS.3DAnalyst.dll”或它的某一个依赖项。试图加载格式不正确的程序。 161,位置 5   Form1.resx    161    5    WindowsFormsApplication2

 或者当你原来是在VS2008 下建立的一个.net framework 3.5版本的程序现在升级到了VS2010编译,同样也会出现下面的错误。

通过手动加载这些类库文件也是出现一样的问题。

编译环境:

      操作系统:Windows 7 64bit旗舰版

   编译环境:VS 2010旗舰版 + ArcEngine 10

解决方法:

      方法一:这个问题是因为VS2010在构建.Net Framework 3.5, 3.0 or 2.0 on x64 machine32位程序造成这样的问题,详细解决方法参见:http://support.microsoft.com/kb/2028833(详见后面的文章)

方法二:将应用程序修改到.Net Framework 4.0环境下,如下图:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值