doghappy / socket.io-client-csharp

socket.io-client implemention for .NET
MIT License
715 stars 124 forks source link

.net 6.0 System.Text.Json conflict #344

Open seshonaar opened 8 months ago

seshonaar commented 8 months ago

Hello,

I have an issue when trying to use the client in a .net 6.0 project. Because the socketio client project is targeting netstandard, a package reference to System.Text.Json package is used. Unfortunately, I cannot use the .net 6.0 json serializer anymore, because this package reference forces me to use the .netstandard v7.0.3 version (through deps.json). This creates a runtime conflict and I cannot continue.

"SocketIO.Serializer.SystemTextJson/3.1.1": {
        "dependencies": {
          "SocketIO.Core": "3.1.1",
          "SocketIO.Serializer.Core": "3.1.1",
          "System.Text.Json": "7.0.3"
        },

It would be great to add a specific target to the project for net6.0. This way the package reference would not be required anymore. Maybe event consider have a dual targeting net4 and net6 instead of netstandard.