just add
var ns = new XmlSerializerNamespaces();
ns.Add("", "");
and thenvar xmlSerializer = new XmlSerializer(typeof(Project));
xmlSerializer.Serialize(fs, project, ns);
but if you want to keep xmlns only with xsi and xsd you should add default namespace to XmlSerializer like this
var defaultNamespace = "http://schemas.microsoft.com/developer/msbuild/003"; var xmlSerializer = new XmlSerializer(typeof(Project), defaultNamespace); xmlSerializer.Serialize(fs, project, ns);