0

We have created an add-in which runs correctly but unable to read from the associated app.config file. We believe the main culprit is that we are running as add-in and can't add the config values to main .exe.

I was wondering is there a way to read these values?

BogadoDiego
  • 329
  • 3
  • 7
user1932923
  • 354
  • 3
  • 18
  • Add-in runs off its own app.config. Make sure it is named `myAddIn.exe.config`. But if you want to read from main application's app.config - you need to use config manager and load that app.config and read it. http://stackoverflow.com/questions/4738/using-configurationmanager-to-load-config-from-an-arbitrary-location – T.S. Aug 05 '16 at 04:51
  • Yes, it's named as myAddin.exe.config and unable to read. I have verified that config file is available in the same directory. – user1932923 Aug 05 '16 at 17:53
  • 1
    I suspecting that your add-in is not EXE. See this answer http://stackoverflow.com/questions/3925308/is-there-a-config-type-file-for-visual-studio-add-in – T.S. Aug 05 '16 at 18:15
  • That worked like a charm. – user1932923 Aug 06 '16 at 21:24

0 Answers0