开发者

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

I always recieve the above error when I generate a proxy class for my service using SvcUtil. The service is exposing a property that is of System.Xml.Linq.XElement type. The SvcUtil generates a System.Xml.XmlElement type property unfortunately. On the other hand if I'm using Add Reference in开发者_高级运维 VS to generate the proxy class, everything's ok. I tried the latest 4.0 version of SvcUtil from the NETFX 4.0 Tools folder, but still with no luck.


In case anyone is still looking, like I was, the answer is here: http://social.msdn.microsoft.com/Forums/en/wcf/thread/42dbe820-3f59-4662-9664-83999e1746c0

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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜