xmlinclude

System.InvalidOperationException: The type [XYZ] may not be used in this context. BUG Confirmed.

Hey all, I'm at my wits end on this one. I occasionally get the error above from my .Net 2.0 asmx web service. I've got the proper XmlInclude() in place, and it only appears sometimes - when I rebuild and update the site, it may show up, it may not, no rhyme or reason. If I move some of the XmlIncludes() around, rebuild, and push the ch...

How to add XmlInclude attribute dynamically

I have the following classes [XmlRoot] public class AList { public List<B> ListOfBs {get; set;} } public class B { public string BaseProperty {get; set;} } public class C : B { public string SomeProperty {get; set;} } public class Main { public static void Main(string[] args) { var aList = new AList(); ...