I have a couple 'large' extensions for ArcGIS that have been in development for a couple of years now. Recently I've found that the "OnStartup()" method in the Extension class is no longer getting hit when ArcGIS is launched. I have a feeling that something has gone with my COM registration.

Note that this is an extension, not an add-in.

The major issue I have run into is my default workspace for storing temporary files is being setup from this "OnStartup()" method (checks to see if the workspace already exists and has files in it, if not it will create the workspace at a default path). So, when I attempt to run a tool from the extension it crashes as it cannot find the path it expects to store temporary files. Interestingly, if I open the Customize->Extension menu in ArcGIS and un-check/check the extension the "OnStartup()" method runs. So, it's almost as if ArcGIS is treating the extension as if it were "off", even though it is checked in the extension menu.

I've gone way back and compared the extension class in source control and cannot find any changes that could have caused this error. This problem may have occurred when I installed the latest service pack, but I can't be sure.

Has anyone else encountered this? Any help would be greatly appreciated!

  • Using categories, in the bin folder next to Arcmap.exe, do you see your extension in the Esri Mx Extensions category. If not, is it under Esri Mx JIT Extensions ? Commented Aug 15, 2011 at 22:08
  • I'm looking in "C:\Program Files (x86)\ArcGIS\Desktop10.0\Bin" and I don't see either of my extensions here. They are installed and I can load them - I'm not sure if this is what you meant. Can you please clarify?
    – Radar
    Commented Aug 15, 2011 at 22:59
  • No, you should see a file called Categories.exe. Launch it and examine what is in the categories above. Commented Aug 15, 2011 at 23:10
  • The extensions are under ESRI Mx JIT Extensions.
    – Radar
    Commented Aug 15, 2011 at 23:18
  • 1
    JIT (just-in-time) extensions are lazily instiantiated only when they are first accessed. Register your extension in the "ESRI Mx Extensions" category instead.
    – Petr Krebs
    Commented Aug 16, 2011 at 8:48

1 Answer 1


Solved. Switched the extension from 'Esri Mx JIT Extension' to 'ESRI Mx Extensions' as suggested in the comments above by @Kirk and @Petr.

The Startup() method now runs. Since the extension is large only the most basic functionality is now contained within any methods that are triggered when ArcGIS loads so as to not slow the launch process.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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