Jump to content
Sign in to follow this  
hans27

Problems using ArcGIS Engine 10 in VB.Net

Recommended Posts

Hello,

          I have given a project from my lecturer to develop a basic gis system application. I plan to use vb.net with arcgis engine to develop the system. So my problems is when i try to use map control, toolbar control and TOC control to start debugging, i get an error message "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.". Someone help pls..

Im using windows 7 64bit

ArcGIS engine 10

ArcGIS desktop 10

Visual Studio 10

capturezdr.jpg

Share this post


Link to post
Share on other sites

Thank you very much for the link. It very useful and gives me a clue about stack overflow :cheesy:..The problem is due to building an application targeted for x86 configuration on x64 machine with Visual Studio 2010. The project contains a resource file referencing a 32-bit assembly. Target Framework selected is 3.5 for ArcGIS engine 10. That why i get the following error:

"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."

Is is because Resgen.exe, which is a part of Windows SDK, is marked as MSIL and hence it will run as a 64-bit process. It will try to load a 32-bit assembly and fail.

So the solution is

1. Close all instances of Visual Studio.

2. From the Visual Studio Tools subfolder, open an elevated “Visual Studio Command Prompt (2010)” (using “Run as administrator” option). Change directory to "<system_drive>:\Program Files (x86)\Microsoft SDKs\Windows\v<x.xx>\bin\”.

3. Issue the command :

corflags /32bit+ ResGen.exe /force

4. Open <project_name>.csproj or  <project_name>.vbproj in notepad.

5. Add the following property <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture> under the PropertyGroup section. Save and close the csproj/vbproj file.

Problem solved

capture1af.jpg

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.