0

I'm converting a COM Extension to an Add-In. The old extension installed a PDF alongside the .dll and an Command in the extension start the PDF Viewer process (using Process.Start(pdflocation).

I'm running into trouble duplicating this with the Add-In structure.

In Visual Studio I have my PDF file included in a 'Resources' folder I made. I've got the PDF's Build Action set to AddInContent. Where can I find this file after the Add-In is deployed?

I used Assembly.GetExecutingAssembly().Location; to see that the .dll file is located in C:\Users\myuseraccount\AppData\Local\ESRI\Desktop10.2\AssemblyCache\{<AddIn GUID>}\ but I do not see my Resources directory here (or even the Images directory containing the images that my Add-In buttons and tools use)

So like the title states... How do I access files in an Add-In that have a Build Type of AddInContent?

1 Answer 1

1

Aha! I figured it out.

What I had to do was set the PDF's 'Build Action' to 'Content' and then set 'Copy to Output Directory' to 'Always'.

More information here: Advanced add-in concepts / File Structure

Just have to RTFM I guess ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.