Nicolas Raoul
Nicolas Raoul

Reputation: 60213

Generate C# from WSDL, without "Order"

I generate C# code from WSDL using "Service References" in Visual C# 2010 (see screenshot).

Generated code uses Order parameters, which makes me think that under the hood, Visual C# is performing is running xsd.exe /order, among other things. Example:

[System.Xml.Serialization.XmlElementAttribute(Order=1)]

Because of a Mono bug, I want to generate C# code WITHOUT Order parameters.
To do that with xsd.exe (XSD to C#), I would simply omit the /order parameter.

But how to generate Order-free code from a WSDL file?
Only the following settings seem to be available:

enter image description here

Upvotes: 1

Views: 1819

Answers (1)

Vignesh.N
Vignesh.N

Reputation: 2666

generate the code normally, then do a regex search and replace in VS.
Replace all occurances of (Order=*)] with ]

Upvotes: 1

Related Questions