"Global element 'configuration' has already been declared" in web config

mao47

I am getting an annoying build warning in my web config. I have about 40 warnings of Global element '{element name}' has already been declared for all the elements in my web config. This is for a WCF service I am creating in the same solution as an MVC website. I suspect that the issue is that the WCF service references the MVC assembly (to reflect some metadata), and both web config files are somehow being included resulting in duplicate items. Searching has only turned up different issues than the one I am having.

Is there any way to fix this issue, perhaps by telling the configuration manager to ignore the config file in the referenced MVC assembly?

EDIT: While trying to separate my different dependencies as much as possible, my warning messages went away after shutting down the computer.

Gaute Løken

Separate your service from your host. IE have your service in a more or less pure assembly and then reference that from your console host, your wcf host, your windows service host and your mvc host projects separately.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related