PROBLEM
When a breakpoint is added to an add-in project in Visual Studio, the breakpoint is not hit when debugging the program. (For more information on breakpoints, refer to Debugging Basics: Breakpoints.)
This issue occurs because the supported runtime version in the configuration (.config) file for the ArcMap add-in application does not match the targeted .NET framework of a Visual Studio project.
In the extensible markup language (XML) code of the ArcMap.exe.config file, lines 4 and 5 state the supported runtime versions for the .NET framework of a Visual Studio project. The compiler reads version 2.0 in line 5, instead of version 4.0 in line 4 as the supported runtime version because line 4 is commented.
Note:
.NET 3.0 and 3.5 frameworks support runtime version 2.0 while .NET 4.0 and 4.5 support runtime version 4.0. For more information on .NET frameworks, refer to How to: Determine Which .NET Framework Versions Are Installed.
Note:
Additionally, do the same when targeting the .NET 3.5 (or under) framework.
Note:
Save a copy of the file in a different folder and use it to overwrite the original file if the following error is returned, "The file cannot be saved and it may be protected."
Get help from ArcGIS experts
Download the Esri Support App