rcoodey

.NET 4 DLL in 3.5 Add-in (Or .NET 4 Add-in not Debugging)

Discussion created by rcoodey on Oct 28, 2010
Latest reply on Oct 27, 2013 by bingxi
So I am trying to port over our custom 9.3 toolbars and commands to 10.  I am really liking the whole add-ins setup for 10 but am having an issue...

We have some external DLLs we need to reference that are compiled with .NET 4.0, and trying to use these in the new .NET 3.5 add-in, it won't compile.

So I can change the add-in to use .NET 4.0, which seems to work fine... is that ok (I would prefer to use .NET 4.0 if it is ok)?  But the problem I am having is that after changing it to .NET 4.0 I cannot debug anymore.  It won't hit break points or anything.  The toolbar seems to be working as .NET 4.0 though.  I know in the past I had a similar issue about not being able to debug and it was because the app.config did not specify the correct .NET version.  But the config has:
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>

So I either need to be able to use .NET 4.0 DLLs in a 3.5 add-in (which I???m thinking is not going to happen), or Debug with a .NET 4.0 add-in.

Any help is greatly appreciated.  Thanks a lot!

*EDIT*  I bet the debugging does not work because ArcMap.exe.config references <supportedRuntime version="v2.0.50727"/> ... hmmmm
*EDIT* Just confirmed the above edit... I can debug now.  Is this ok?  would we need to push this config change out to all our users too to make sure the .NET 4 code runs properly?

Outcomes