ArcEngine10 compile the. NET Framework version 3.5 problem in VS2010

Source: Internet
Author: User

Problem Description:

Some time ago, a VS2010 was installed, with ArcEngine10 in VS2010 based on the. Net Framework 3.5 To create a new Mapcontrol application project, the following creation process:

1. Start Visual Studios 2010.

2 . Select New Project ....

3. Expand arcgis->extending arcobjects and select Mapcontrol application for Visual C # using the. NET framewor K 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 Soluti On Explorer.

5. at this point, I can builds 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

But as soon as the program runs, a bug similar to the following occurs:

Error 1 failed to load the file or assembly "File:///C:/Program files (x86)/arcgis/developerkit10.0/dotnet/esri. Arcgis.3danalyst.dll "or one of its dependencies. An attempt was made to load an incorrectly formatted program.   Line 161, Position 5. Form1.resx 161 5 WindowsFormsApplication2

Or when you originally created a. NET Framework version 3.5 program in VS2008 now upgraded to VS2010 compilation, the following error also occurs.

The same problem occurs when you load these class library files manually.

Compilation Environment:

Operating system: Windows 7 64bit flagship

Compilation Environment: VS 2010 flagship + Arcengine 10

Workaround:

Method One: This problem is caused by the fact that VS2010 is building the. Net Framework 3.5, 3.0 or 2.0 on x64 machine 32-bit programs that cause this problem, detailed workaround see: http://support.microsoft.com/ kb/2028833 (see the article later)

Method Two: Modify the application to the. Net Framework 4.0 environment, the following figure:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.