Consider the following scenario:
I have a method defined as
public Task<IList<string>> GetListAsync(), in an IRpcService. The client application is targeting net472, and the server application is targeting net10.0.
The server implementation is returning just new List().
The client is calling var list = await GetListAsync();
Expected result
Empty list is returned.
Actual result
System.Runtime.Serialization.SerializationException: Cannot deserialize inbound call arguments. ---> System.Collections.Generic.KeyNotFoundException: Type 'System.Collections.Generic.List`1[[System.String, System.Private.CoreLib]], System.Private.CoreLib' is not found.
at Type ActualLab.Reflection.TypeRef.Resolve()
at Type ActualLab.Rpc.Serialization.Internal.ByteTypeSerializer.FromBytes(ByteString bytes)+(ByteString b) => { }
at TValue System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory)
at Type ActualLab.Rpc.Serialization.Internal.ByteTypeSerializer.FromBytes(ByteString bytes)
at Type ActualLab.Rpc.Serialization.Internal.ByteTypeSerializer.ReadItemType(ref ReadOnlyMemory<byte> data)
at Type ActualLab.Rpc.Serialization.Internal.ByteTypeSerializer.ReadDerivedItemType(ref ReadOnlyMemory<byte> data, Type expectedType)
at void ActualLab.Rpc.Serialization.RpcByteArgumentSerializerV4.PolyDeserialize(ArgumentList arguments, ReadOnlyMemory<byte> data)
at void ActualLab.Rpc.Serialization.RpcByteArgumentSerializerV4.Deserialize(ref ArgumentList arguments, bool needsPolymorphism, ReadOnlyMemory<byte> data)
at ArgumentList ActualLab.Rpc.Infrastructure.RpcInboundCall.DeserializeArguments()
at Task ActualLab.Rpc.Infrastructure.RpcInboundCall.Process(CancellationToken cancellationToken)
If I change the interface to request Task<List<string>>, the call succeeds.
Tried with 12.1.61.
Consider the following scenario:
I have a method defined as
public Task<IList<string>> GetListAsync(), in anIRpcService. The client application is targetingnet472, and the server application is targetingnet10.0.The server implementation is returning just
new List().The client is calling
var list = await GetListAsync();Expected result
Empty list is returned.
Actual result
If I change the interface to request
Task<List<string>>, the call succeeds.Tried with 12.1.61.