I am developping an ArcMap 10.3 Add-In targeting .NET framework 4.5 on Visual Studio 2013. I used ESRI's wizard to build a simple button add-in and the projects debug properties are configured to start the external program "C:\Program Files (x86)\ArcGIS\Desktop10.3\bin\ArcMap.exe".
The add-in ran properly when I started debuggig the Add-In for the first time but I couldn't get the breakpoints to hit. I followed ESRI recommandation "How to debug" on ESRI online help and modified the ArcMap.exe.config file to enable supported runtime 4.0.30319
<startup>
<supportedRuntime version="v4.0.30319"/>
<!-- <supportedRuntime version="v2.0.50727"/> -->
</startup>
The next time I started debuggin the Add-In I get an error message from Visual Studio : "Error while trying to run project: Unable to start program 'C:\Program Files (x86)\Desktop10.3\bin\ArcMap.exe'."
This error message comes right after ArcMap's splash screen. The following screenshot is not from the actual Add-in because the splash screen appears and disappears way too fast and I can't get screenshot.
I tried different things but without success :
I dont know what to do next to be able to debug the Add-in. I don't want to develop without this feature!
Any help would be greatly appreciated.
Thanks
Solved! Go to Solution.
Awesome, just what I was looking for. So far it works great
This also worked for me. Thank You!!
Any insight to why this works?
EIther way, thanks again.
Thank you! I was able to run and debug the Addin.
Yeah great! It works but we lose edit and continue?! This wouldn't be so bad if ArcMap didn't take an age to start. This makes debugging very tiresome
This may be a fluke, but I seem to have stumbled upon a solution. Open VS, turn on Managed Compatibility Mode and start ArcMap once. Hit the stop button to close ArcMap, then turn off Managed Compatibility Mode, then press play. ArcMap magically started the second time, and I was able to use edit-and-continue. I tried this in both VS 2013 and VS 2015, and it worked, though in VS 2013 I had to press play 3 times in a row before ArcMap started. Like I said, I'm not sure if this is a solution per se, but it works at least for me.