XmlSerializer gives NotSupportedException

Version: Linqpad 6 x64 v6.10.13

When creating a XmlSerializer the error NotSupportedException is thrown with the following details:

"A non-collectible assembly may not reference a collectible assembly."

Code Sample:

void Main()
{

    XmlSerializer ser = new XmlSerializer(typeof(Customer));
}

// You can define other methods, fields, classes and namespaces here
public class Customer{
    public string Name { get; set; }

}

Comments

  • Don't quite understand what this is all about, but you could try the new beta as it has an option relating to 'non-collectiible' in advanced query properties (see screenshot)

  • Production version 6.11.11 indeed has this option and it does the trick. Though I'd like to know what's this about as well.