Question

The entry 'MyCustomElement' has already been added.

C:\Projects\Sandbox\Sandbox.Console\bin\Debug\Sandbox.Console.vshost.exe.config line 52

I'm a bit stumped on this one. This console app has had quite a few custom config sections added over the past few weeks with no issue. We've run the app for some time and just recently(within the past two days) we've bumped into this issue.

I've read about this happening to older web apps after installing 3.5, virtual directories, etc. However, we've always been 3.5 here and this is a console app.

The only change that occurred recently was the addition of a new custom config section. When the error occurred, we naturally removed that section, however the error was then returned naming the following config section(previously working) as the culprit.

Was it helpful?

Solution

This was discovered to be caused by a custom ConfigurationCollection class intended to be generic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top