ArcMap add-in can't find dll

388
1
11-28-2018 02:40 AM
Highlighted
Occasional Contributor II

I am developing an ArcMap add-in containing a Dockable Window. Because I expect this add-in to be moved to ArcGIS Pro at some time, I chose to use WPF instead of Windows Forms. The idea is that I create UserControls that can be hosted in both an ArcMap Dockable Window and an ArcGIS Pro Window. These UserControls will go in a separate class library.

The problem I have now is that this class library cannot be found by the add-in. I checked the .esriAddin file, and the directory %LocalAppData%\ESRI\Desktop10.4\AssemblyCache\{MyAddinGuid} but the dll is there. Using the Process Monitor tool, I found out that the dll is only looked for in C:\Program Files (x86)\ArcGIS\Desktop10.4\bin, and not in the AssemblyCache\{} folder. (When I copy the dll to the Desktop\bin folder, everything works as expected, but I don't want to put it there)

Does anyone know what's going on?

ArcGIS 10.4.1

Visual Studio 2015

.NET Framework 4.5

Reply
0 Kudos
1 Reply
Highlighted
Occasional Contributor II

I managed to find a workaround: I added a class with one empty method to the library containing my usercontrol. When calling this method from the Dockable Window's constuctor, the dll is loaded, and can be found at the time the usercontrol is needed.

Reply
0 Kudos