Wrong App.config being loaded

前端 未结 4 1975
无人及你
无人及你 2021-01-13 19:12

I have a .NET 3.5 class library I built that reads an App.config file for values it needs. It can pull the config values just fine when I test it in Visual Studio. To test

4条回答
  •  醉梦人生
    2021-01-13 19:52

    An app domain in C# can have only one assembly level app.config file. See here on MSDN. An executable will always start up an AppDomain and by default look for a config file with name: EXECUTABLE_NAME.config. For example, SampleApp01.exe will look for SampleApp01.exe.config as its configuration file.

提交回复
热议问题