wcf
wcf copied to clipboard
Generated code won't compile if a property named "System" exists
I have create a connected service from a wsdl provided by a customer. The generated code won't compile because the code contains a class with an object called System. This breaks the XmlElementAttribute since the compiler tries to use the property System instead of the namespace System.
Manually prefixing the namespace with global:: fixed the issue for now.
Thanks for reporting this. In general naming a property System isn't a great idea because of conflicts like this, but we'll look into if we can add the global keyword to avoid this conflict in the generated code in a future release.