Main menu:

Search

 
web
kriegermartin.de

Categories

July 2007
M T W T F S S
« Feb   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Archives

WCF: Don’t trust /serialize:Auto

There is a small bug in .NET 3.0 WCF proxy generation tool:

Using an .asmx web service with a method like

[WebMethod]
[return: XmlAttribute]
public string HelloWorld(int a, [XmlAttribute]int b, int c)

svcutil /serializer:Auto or the AddServiceReference feature in Visual Studio generates a

public void HelloWorld(int a, int c)

proxy method - without any complain or warning. Using svcutil /ser:XmlSerializer works. See this MSDN forum thread.

Addendum: This bug is NOT fixed in .NET 3.5.