VS 2010 ArcObject 10 MapControl App Compile Problem

3185
12
10-27-2010 02:32 PM
MarkParr
New Contributor
I am experiencing a problem on my Windows 7 Ultimate 64 bit laptop using Visual Studios 2010 to develop an ArcObjects 10 MapControl Application.  Any idea as to the problem would be greatly appreciated.  Here are the steps one at a time leading up to the problem:

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

Here is where the problem starts:

6.  Now, double click on the MAINFORM.CS pulling up the Main Form which contains an ArcGIS 10 Engine ToolbarControl, TOCControl, MapControl, and LicenseControl.
7.  At this point, try to BUILD the application and the following error takes place during the build: 

Error 1 :
Could not load file or assembly 'file:///C:/Program Files (x86)/ArcGIS/DeveloperKit10.0/DotNet/ESRI.ArcGIS.ADF.Local.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.   Line 189, position 5.

Double clicking on the error pulls up the following code in MainForm.resx:

</value>
  </data>
  <data name="axToolbarControl1.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
        LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
        ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAKgMAAAIB
        AAAAAQAAAAAAAAAAAAAAABUDAAAPAAAAAgAAAAEAAAAKAAAAAAAAAACsXgAAUQIAAAAAAAAcAAAAYQB4
(lot more lines deleted)

And places the cursor after the SLASH in the </data> XML parameter.

Any idea what is going on here?
0 Kudos
12 Replies
KeithOlson
New Contributor III
HELP!!!

I had the same problem and followed the steps at http://support.microsoft.com/kb/2028833, but now Visual Studio won't compile anything!  I get the error "Resgen.exe exited with code �??1073741813"  How do you reverse those steps?  There was a message saying that I'll need to resign the assembly.  What's that about?
0 Kudos
GeorgeClooney
New Contributor
How can the controls be THIS GOOD!? WOW!
0 Kudos
AlexanderGray
Occasional Contributor III
64 bit with desktop 10.0 uh?  We are all waiting for that one.  Of course MS could do better to support those stuck in a 32 universe...
0 Kudos