PdfSharpCore icon indicating copy to clipboard operation
PdfSharpCore copied to clipboard

Remove ICloneable and ISerializable from default namespace

Open dejx opened this issue 4 years ago • 0 comments

After few hours of debugging the Error Message: System.Runtime.Serialization.SerializationException : Type 'xxx' is not marked as serializable.

I found that the problem is in PdfSharpCore

There are few interfaces with default namespaces e.g. https://github.com/ststeiger/PdfSharpCore/blob/master/PdfSharpCore/SilverlightInternals/AgHacks.cs#L55 https://github.com/ststeiger/PdfSharpCore/blob/master/PdfSharpCore/SilverlightInternals/AgHacks.cs#L61

This mean that default namespace is used (System)

This also means, when you include this package to your project, SerializableAttribute is used from PdfSharpCore assembly and not the framework's. Resulting in the error mentioned above.

Please, remove those interfaces.

clone of https://github.com/ststeiger/PdfSharpCore/issues/102

dejx avatar Aug 05 '20 06:08 dejx