You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
I am using the TypelessContractlessStandardResolver along with the options to omit the assembly version and allow assembly version mismatch. If the payload is just an object of type T then everything works as expected. If the payload is a List then the assembly version for type T is included and the deserialization fails if there is an assembly mismatch.
Repro steps
[MessagePackObject]
public class Message
{
[Key(0)]
public string MessageName { get; set; }
[Key(1)]
public object Payload { get; set; }
}
[MessagePackObject]
public class TestClass
{
[Key(0)]
public int Prop1 { get; set; }
}
var msg = new Message()
{
MessageName = "MyMessage"
};
var testClass = new TestClass() { Prop1 = 1 };
var payloadList = new List<TestClass>() { testClass };
msg.Payload = payloadList;
var opts = TypelessContractlessStandardResolver.Options
.WithOmitAssemblyVersion(true)
.WithAllowAssemblyVersionMismatch(true);
// Includes Assembly Info - Not expected
var bytes = MessagePack.MessagePackSerializer.Serialize(msg, opts);
// Excludes Assembly info - Expected
msg.Payload = testClass;
bytes = MessagePack.MessagePackSerializer.Serialize(msg, opts);
Additional context
MessagePack 2.2.85
.NET Core 3.1
I am using MessagePack as the serializer for Service Fabric Remoting. Under this use case, the assembly versions will not always match between the client and the server.
The text was updated successfully, but these errors were encountered:
Bug description
I am using the TypelessContractlessStandardResolver along with the options to omit the assembly version and allow assembly version mismatch. If the payload is just an object of type T then everything works as expected. If the payload is a List then the assembly version for type T is included and the deserialization fails if there is an assembly mismatch.
Repro steps
Additional context
MessagePack 2.2.85
.NET Core 3.1
I am using MessagePack as the serializer for Service Fabric Remoting. Under this use case, the assembly versions will not always match between the client and the server.
The text was updated successfully, but these errors were encountered: