SvcUtil and 'System.Xml.Linq.XElement' cannot be converted to a compiler error 'System.Xml.XmlElement'

I always get the above error when I create a proxy class for my service using SvcUtil . The service displays a property of type System.Xml.Linq.XElement . Unfortunately, SvcUtil creates a property of type System.Xml.XmlElement . On the other hand, if I use Add Reference in VS to create a proxy class, everything is fine. I tried the latest version of SvcUtil version 4.0 from the NETFX 4.0 Tools folder, but still no luck.

+6
error-handling
source share
1 answer

If someone is still looking, like me, the answer is here: http://social.msdn.microsoft.com/Forums/en/wcf/thread/42dbe820-3f59-4662-9664-83999e1746c0

Yaron Naveh suggests adding the / reference argument to SvcUtil.exe.

svcutil / reference: "c: \ Program Files \ Reference Assemblies \ Microsoft \ Framework \ v3.5 \ System.Xml.Linq.dll" http: // localhost ...

+2
source share

All Articles