1

I have an excel plugin where I want to read an xml file on form load from a config folder, but I can't figure out how to read from that folder after I deploy the application.

On the excel ribbon, when the user clicks a button to open my plugin, on form load, I want to read from a specified directory. I am deploying the application with ClickOnce and using VS 2017. I set the xml file build to Content and set Copy to output directory as Always. When I deploy, it puts the xml file in some ClickOnce dll folder when the user installs it.

xaisoft
  • 3,343
  • 8
  • 44
  • 72
  • Does this help? [Find Install directory and working directory of VSTO Outlook Addin; or any Office Addin](https://stackoverflow.com/questions/9886957/find-install-directory-and-working-directory-of-vsto-outlook-addin-or-any-offic) – Chris Jul 10 '17 at 17:57

1 Answers1

0

Try InstallDir = Environment.CurrentDirectory; at startup of you plugin.

In ThisAddIn_Startup or in your ribbon constructor.

Fabrice T
  • 648
  • 9
  • 23