Issue : AddIn button/tool force Arcgis 10.2.2 to close.

Development environment: Visual Studio 2013, .Net framework 4.5 (I tried with 4.0 also), Arcgis for desktop 10.3 Works fine on development machine with version in AddIn config file as 10.1 or 10.2 or 10.3

User environment: Arcgis 10.2.2. AddIn get installed with version in AddIn config as 10.1 or 10.2. I am able to see the tool bar and tools. The moment I click in map view after taking a command from my AddIn Arcmap window exits without any message

  • Sounds like you may need to add some break points or messaging to find out exactly where in the code is failing.
    – artwork21
    Mar 8, 2016 at 12:40
  • 4
    10.1 required VS2010 and .Net 3.5, though VS2012 was added at 10.2.x, but still .Net Framework 3.5. Close adherence to the requirements is always recommended for low-level development.
    – Vince
    Mar 8, 2016 at 14:18

2 Answers 2


If I have understood you are developing on a 10.3 machine and manually (?) editing the configuration file to say it's a 10.2 addin, is this correct?

If you are developing for a 10.2 environment you need to be using. Net 3.5 not 4. Also you should be developing on a machine that has 10.2 installed and visual studio 2010.

Upgrading to the latest version of visual studio, arcmap and. Net is just shooting yourself in the foot!

  • 100% agree with you except you didn't answer the question... I think what the user is after is IApplication.Shutdown help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/… to close the application.. saving or saving as can also be controlled by the IApplication interface (ArcMap.Application in an Esri AddIn) that is if the user wants the button to close ArcMap and isn't complaining that a tool crashes (thereby closing) ArcMap - it's kind of hard to tell. Mar 10, 2016 at 1:28

This is a problem with the COM model that ESRI chose to go with with ArcGIS Desktop.

There are several things that you would need to do to fix this problem.

  1. Install the version of arc you are building for. (ie. 10.2.2). You would also be able to install 10.2 and this will work with any further version of 10.2.x.
  2. Install either Visual Studio 2010 or Visual Studio 2012.
  3. Change the project .net version to 3.5
  4. Change the target in the config.esriaddin file to 10.2 or 10.2.x. You will need to change the target and make sure that your AddIn Language is set to "CLR".
  5. I would assume you are referencing some ESRI assembly's so you will need to remove the 10.3 references and re-add those same ones with 10.2 versions.

You should now be able to recompile and it should work.

Your Answer

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

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