Select to view content in your preferred language

Debugging add-in in Visual Studio - Add-in is not deployed automatically

3461
6
03-14-2011 03:29 AM
João_PauloMenezes
Emerging Contributor
In this page:

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_debug_add_ins/00...

it says to "Confirm that the add-in is deployed to the well known folder where the Desktop applications will access it. Typically this is already done because add-ins created with the ESRI Visual Studio integrated development environment (IDE) template are automatically deployed each time they are built."

Well, I have created a Visual Studio Add-in Application for ArcCatalog, and when I build it or debug it, the .esriAddIn file does not get copied to the AddIns folder in my user\documents\ArcGIS folder.

I have tried to add a Post-build event in Visual Studio to copy that file but it seems that the file is not immediately available after build and so the copy fails.

If I manually copy the .esriAddIn and manually start ArcCatalog, the add-in works fine but to debug it I have to manually attach Visual Studio to the ArcCatalog process everytime, which is very time consuming.

What am I doing wrong?
0 Kudos
6 Replies
SebastianKrings
Frequent Contributor
hi,

by defult its not neccessary to do this, if you have created an addIn-Project in Visual Studio.
Maybe, you can go back, make the options to default, and create a new addIn project importing your old developments.
0 Kudos
João_PauloMenezes
Emerging Contributor
The problem is that I changed the "Target Framework" to ".NET Framework 4" in the Visual Studio project.

When I press F5, ArcCatalog launches, the Add-in works as expected but I cannot debug/breakpoint.

I have also tried changing the AddIn language to "CLR4.0" in the .esriaddinx file, without success.

Have anyone managed to debug .NET 4.0 Add-ins with F5?
0 Kudos
RichardWatson
Deactivated User
Use the 3.5.1 framework instead of 4.0.

Yes, you can make 4.0 work but ESRI does not deliver it and you have to do a bit of configuration.  Search the forums for this because it has been discussed.
0 Kudos
João_PauloMenezes
Emerging Contributor
Hi again Richard.

I understand that this isn't supported, as ArcCatalog does not run on .NET 4.0

At this point, because I'm using many 4.0 functionalities, it would be difficult to go back to 3.5

Can you please give me a reference/link to the forum threads that concern this issue? I couldn't find any of them.

Thank you.
0 Kudos
RichardWatson
Deactivated User
Here is a few of the posts I quickly found.  There are many more I remember seeing some time ago, including posts which describe how you modify the config file in order to make the 4.0 framework work.

My recommendation is to stick with 3.5 and move to 4.0 only after ESRI supports it.

http://forums.arcgis.com/threads/12861-Visual-Studio-2010-Integration-Problem?highlight=4.0+framewor...

http://forums.arcgis.com/threads/8595-Does-ArcGIS-10.0-support-.NET-4.0?highlight=4.0+framework

http://forums.arcgis.com/threads/8315-Which-Visual-Studio-edition-for-ArcGIS-10-development?highligh...

http://blogs.esri.com/Info/blogs/arcgisexplorerblog/archive/2010/09/08/using-visual-studio-2010-and-...
0 Kudos
MichaelRobb
Honored Contributor


My recommendation is to stick with 3.5 and move to 4.0 only after ESRI supports it.



BINGO!

Search function is your friend!
0 Kudos