I can't answer your original question, which I found because we have exactly the same problem with MsTest and NUnit, but I can recommend an effective workaround for anyone else who finds themselves in this situation. This is using XML Canonicalization, eg:
using System.Security.Cryptography.Xml;
string canonicaliseXml(string xmlInput)
{
XmlDocument myDoc = new XmlDocument();
myDoc.LoadXml(xmlInput);
XmlDsigC14NTransform t = new XmlDsigC14NTransform();
t.LoadInput (myDoc);
var ms = (MemoryStream)t.GetOutput();
return Encoding.UTF8.GetString(ms.ToArray());
}
XML Canonicalization normalises XML strings by steps like removing white space between elements, ordering attributes alphabetically and expanding short-form empty elements (there's a helpful explanation at http://en.wikipedia.org/wiki/Canonical_XML) so that:
<root x='x' a='a'> <trunk>etc</trunk> <empty /> </root>
will be canonicalised as
<root a="a" x="x"><trunk>etc</trunk><empty></empty></root>
Obviously this will resolve any difference in the ordering of the xsd and xsi namespace declarations, as experienced by us and by the original poster.
EDIT
If you want to take a belt-and-braces approach, you could combine this with the "new XmlSerializerNamespaces()" technique in http://silent-code.blogspot.co.uk/2009/09/using-xmlserializer-without-rendering.html, which filters the redundant xsd and xsi namespace declarations from the initial serialization.