[Microsoft (R) .NET Framework, Version 4.6.81.0]
- - There was an error reflecting type
'Daff.Lae.TraceCommon.Exceptions.NicePopupException'.
- Cannot serialize member System.Exception.Data of type
System.Collections.IDictionary, because it implements IDictionary.
From:
namespace Daff.Lae.TraceCommon.Exceptions
{
[KnownType(typeof(Exception))]
[XmlSerializerFormat]
[Serializable]
public class NicePopupException : Exception
{
private NicePopupException() { }
public NicePopupException(string message) : base(message)
{ }
public NicePopupException(string message, Exception innerException) : base(message, innerException)
{ }
}
}
(In desperation) I've tried all variations of [KnownType(typeof(Exception))],
[XmlSerializerFormat], [Serializable]
.
(that is, they are not causing the error).
Seen when:
Visual Studio > Build > Build Daff.Lae.TraceCommon
$ cd to_appropriate_directory
$ xsd.exe .\Daff.Lae.TraceCommon.dll
The problem IDictionary
is on Exception
as _data
.
However if I remove all uses of NicePopupException
and change to Exception
, there is no such error.
Is there something else I need to add to NicePopupException
to get this to work?