Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First ever post to this forum,

I have a C# extension (legacy from another developer) which I am trying to debug in the ArcGIS 10 Environ (64bit machine/Windows7).

I have built the ext in "Debug" mode and have a .dll, and a .tlb file available and ready to go in the "Debug" folder of my project.

My User Account Control Settings are set on the lowest setting possible, I am wide open. This is a virtual machine.

When I run debug, and then try to "Add from File" I get a message of "No Objects Added" from this project.

Frustratingly enough, I have another extension which I wrote and I am able to fire it up and debug it. Try as I might I have not found any difference between the project set ups for either of these two extensions.

Does anyone have any suggestions?

share|improve this question
Are you running Visual Studio as Administrator (and not just as a user with admin privs)? – Kirk Kuykendall Jul 29 '11 at 15:05
You know I am unsure on this one. I will look into it. – AndyMan Aug 2 '11 at 17:50
I was not running the Visual Studio as Administrator, but when I ran it as Admin and not a user with privileges it still did not work. – AndyMan Aug 3 '11 at 10:21
One aspect of the question answered: The sample solution files were set to run in a different version of the DOT Net framework. Changing my "TestButton" to the same framework (2.0, or 3.5) enabled debugging. I still cannot get the legacy code to add any objects to the test machine. – AndyMan Aug 3 '11 at 12:22

Do you have access to the code?

You need to first register the COM classes created (commands, tools, etc.).

After you registered them in, you will be able to access anything created by the other developer inside ArcMap. I'm not sure if it works for 10, but it should.

As for debbuging the code, just open visual studio, set up the project to register for cominterop and for Visual to lauch ArcMap when you press f5.

Place a breakpoint in the desired location and you're good to go.

Check screenshots

Register for COM interop Run external program

share|improve this answer
Thanks, I appreciate the screenshots. I have ensured that the project has the check box for Com Interop "Checked". However, I am not able to step through. This is one of the two first projects I have tried in VS 2010. – AndyMan Jul 29 '11 at 15:19
I have reviewed the article, and attempted to use the Component Categories Registrar on the "other guys code". All of the appropriate boxes appear to be checked. To ensure I am able to debug a new command button, I made a template and put in breakpoints, checked for ComInterop (box/checked) and started up Debugging in VS2010. With no luck. Never have tried REGASM, and am unsure of how. – AndyMan Jul 29 '11 at 15:30

I think you should try to use the custom build events that runs the ESRI Regasm tool.

In the link below, the second from last bullet point has how to do it. Once I followed the instructions I was able to debug.

share|improve this answer
Jamie, Thanks for the info. I am new to RegAsm. I tried the information outlinned in the above article and added the outlinned XML to the .csproj file. I was able to build the project and then add from file (.tlb) for the test command button I am using to run down this error. However, it just appears to install, and not behave as a .dll I am debugging – AndyMan Jul 29 '11 at 16:02
Sorry it did not solve your issue. – Jamie Jul 29 '11 at 20:48
I am still working on this, I don't know if I mentioned this, but the machine I am trying to debug this code on is a Virtual Machine. Andy – AndyMan Aug 2 '11 at 17:41

Another option is if you have the ArcGIS DeveloperKit installed you could use one of the projects as a template and just swap your code in there. It can be kind of tricky setting up the Component Categories Registrar code section. You can find the DeveloperKit samples usually here depending on what version or ArcGIS you are using.

C:\Program Files\ArcGIS\DeveloperKit\SamplesNET\Desktop

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.