How to enable configSource attribute for Custom Configuration Section in .NET?

前端 未结 1 1756
清酒与你
清酒与你 2020-12-01 15:44

following the wealth of information found here how can we get an external .config to work? I\'ve tried the same setup I would use for an external appSettings file, but it is

1条回答
  •  情深已故
    2020-12-01 16:36

    The actual file, must be placed relative to the project output folder (by default "\bin\debug" or "bin\Release"

    Also, The file in your project tree, look at the properties of the file, and make sure the "Copy to Output Directory" setting is set to "Copy Always" or "Copy if Newer"

    EDIT: make sure the separate config file has an xml Element header. The entire file contents should read as follows:

    
    
    

    0 讨论(0)
提交回复
热议问题