how do I make my application read the application config instead of machine.config?

后端 未结 3 1461
滥情空心
滥情空心 2021-01-06 01:16

I have an word add in application created in c# which is accessing a web service and is perfectly working if installed outside Program Files folder. the weird thing is that

3条回答
  •  臣服心动
    2021-01-06 01:49

    The machine .config file specifies the settings that are global to a particular machine - so whatever you changed can potentially affect every other app on the machine.

    The App config contains application specific settings so your applications settings really should be in there.

    When you built and deployed your application to Program Files was the app config copied along with it? Did you set the "Copy to Output Directory" property?

提交回复
热议问题