0
votes

I've just taken over the running of a project with some WCF service references, and I've noticed there are a bunch of warnings about one of the generated XSD files along the lines of:

The global attribute 'http://schemas.microsoft.com/2003/10/Serialization/:FactoryType' has already been declared.

The global element 'http://schemas.microsoft.com/2003/10/Serialization/:anyType' has already been declared.

The global element 'http://schemas.microsoft.com/2003/10/Serialization/:boolean' has already been declared.

I can't seem to see why these errors are happening; it doesn't look like it is referenced multiple times. If I update the service reference, or delete and re-add it, I get the same errors again. How can I diagnose and fix these warnings?

1

1 Answers

0
votes

Turns out the error seems to be inherent to the Visual Studio "Enable XSD as type definition language" option in the "WCF Options" tab for a project. I tried creating a new project with that enabled, and adding my 2 service references, and I got the same set of warnings again. The solution for me was to just turn off that XSD code generation option.