I'm working on migrating most of my project to .Net Standard 2.0.
Last part of the project in .net standard 4.7.1 is a WCF front end. This executable communicate with a .net core application throught a library Akka.net by ClientServiceReceptionist.
Network communication between application by akka.net work. Except when an it try to serialize a ReadOnlyCollection.
In this case the system try to load a "System.Private.CoreLib.dll" that is not available.
I readed many issues with .net 4.6 using .net standard 2.0 libraries that must have been corrected in 4.7.1. I pass from package.config to PackageReference.
I tryed to used NewtonSoft as a serializer in place of Hyperion without progress.
Does anyone have an idea, a solution ?
Edit : 07-05-2018
The issue is throw in the WCF Entry Points when i sent a ClusterClient.Send object throught the ClusterClientReceptionist.
The object sent contains only boolean, string, Guid and array of string properties.
Edit 08-05-2018
The object sent look like this :
{
(string) "Path": "/user/ProcessOrderWorkflow",
"Message": {
"Order": {
"Data": {
(string)"Sentence": "i love my name",
"Options": {
(boolean)"Simplify" : true,
(IReadOnlyCollection<string>) LanguageAffinity : [ "FR", "EN" ]
}
},
"OrderQuery": {
"Verb": {
(string)"Verb": "Extract"
},
"Arguments": [
{
(string)"Argument": "Sentence"
},
{
(string)"Argument": "Meaning"
}
]
},
(Guid)"ProcessId": "0bfef4a5-c8a4-4816-81d1-6f7bf1477f65"
},
(string)"ReturnTypeFullName": "Viki.Api.Server.Data.SentenceMeaningMsg,, Viki.Api.Server.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
},
(boolean)"LocalAffinity": false
}
Each of the object used in the hierachi is builded using the constructor. All the properties are in readonly.
I tryed to serialize and deserialize the result on the WCF part before it's sent and it works.
var serializer = this._system.Serialization.FindSerializerFor(result);
var bytes = serializer.ToBinary(result);
var data = serializer.FromBinary(bytes, result.GetType());
The strange think is that it try to deserialize the object in the WCF part where it is sent and not in the LightHouse where the element should be received and transfert to a agent for processing.