Wednesday, April 9, 2014

app.config for Office Addin

When you are developing a plugin office our settings should be saved in the app.config, but unfortunately this results in Excel.exe.config, Winword.exe.config, etc..

To solve this problem simply create a new .config file with the following name:
<pluginname>.dll

Visual Studio will create a new file called <pluginname>.dll.config and this is what our plugin will read, as evidenced by the following statement



Remember to set up file property to "Copy to output directory"

See MSDN page

No comments:

Post a Comment