Skip to content
Discussion options

You must be logged in to vote

Thanks for the excellent explanation and especially the minimal repro.

This is by design. You should not make your Witness classes public. They should be internal and each assembly that needs to invoke serialization should be using its own witness class. I was able to get your failing test to pass by defining its own witness class, as follows:

working test
using ChildApplication;
using ChildLibrary.Derived;
using ChildLibrary;
using Nerdbank.MessagePack;
using ParentLibrary;
using ParentApplication;
using PolyType;

namespace TestProjectWithDependencies
{
    public class UnitTest1
    {
        private MessagePackSerializer CreateSerializer()
        {
            var serializer = new M…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fralorange
Comment options

Answer selected by AArnott
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants