IpcServiceFramework icon indicating copy to clipboard operation
IpcServiceFramework copied to clipboard

Interface with string parameters fail

Open large opened this issue 5 years ago • 5 comments

Describe the bug Functions like this fails: bool Reload(string item); Functions without string works as it should: bool ReloadAll(); bool ReloadIteml(int num); bool TryAll(bool areyousure);

It worked in earlier releases, but failing now.

Expected behavior Strings should work, the IpcServiceClient.InvokeAsync returns false always not triggering the function in the other side.

large avatar Feb 23 '20 20:02 large

Hi @large ,

Is the bool Reload(string item) operation defined in a service contract currently shared between server and your client?

In the latest release (v2.3.1), both TCP and NamedPipe server types should be able to work with this kind of service contract signature.

dmiu avatar Feb 24 '20 21:02 dmiu

@dmiu yes it is share between server and client. But I thinks the serialize process fails because the server is .net 472 and client is .core 3.1. Seems like .net process strings with mscorlib and .core are using System.Private.CoreLib

But it works on everything else than the strings.

large avatar Feb 25 '20 10:02 large

@large Sorry but I'm not able to reproduce your issue and string should work for every existing version (covered by tests)

jacqueskang avatar May 03 '20 10:05 jacqueskang

I'm facing the same issue. Communication between a .NET Core and .NET Framework process is throwing the following exception: Newtonsoft.Json.JsonSerializationException: Error converting value "System.String, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e" to type 'System.Type'. Path 'ParameterTypes[0]' This is happening on latest version 2.3.1 but doesn't seem to happen so far on version 2.2.2 I had to downgrade to get the software working again. Any ideas why the behaviour has changed between versions?

mheskol avatar May 18 '20 11:05 mheskol

@mheskol I did not have any success on this, so I created my own IPC to handle it. Maybe this can be implemented into this?

https://github.com/large/SimpleCrossFrameworkIPC

large avatar May 18 '20 18:05 large