Select to view content in your preferred language

How to get a 3rd party .net lib into esriaddin

2310
2
05-27-2016 04:12 AM
BernhardSnizek
Deactivated User


Hi,

we have built a nifty add-in for ArcMap 10.2.2 that depends on CefSharp, a Chromium browser implementation in .net.

GitHub - cefsharp/CefSharp: .NET (WPF and Windows Forms) bindings for the Chromium Embedded Framewor...

CefSharp depends on a series of files that need to be copied into the distribution, i.e. the .esriaddin file.

These files are of diverse types, see a list here: Output files description table (Redistribution) · cefsharp/CefSharp Wiki · GitHub

We managed to copy the files into the esriaddin by setting them to Content | Copy always - when we look into the esriaddin all files are there but it seems they cannot be loaded.

Copying the files into the bin folder of ArcMap helps but it is not an option.

Any thought is welcome, do we need special Build Actions for different file types ?

Thanx

/Bernie

2 Replies
AhjungKim4
Frequent Contributor

Hi Bernie, 

Have you had any luck figuring this out? I am facing the same issue now and  would appreciate advices from you. Thank you!

0 Kudos
KarlHuber
Occasional Contributor

Esri copies the AddIn into an Esri-self-handled sort of Assembly Cache. IMHO: Any "non DLL" data that is enclosed by the given AddIn-Zip will not be available to the caller directly.

When I stumbled upon that issue I introduced the file that I needed later as "resources" into one of the assemblies from my AddIn and loaded them by using the "Assembly.GetManifestResourceStream" method from System.Reflection.

Maybe that can help in your case? I assume that your "CefSharp" instance needs them instantly? Maybe create a wrapper around that 3rd party component and preload the required files as resources from your assembly and place them into their dedicated spot then just before you make use of your 3rd party component...

HTH