doghappy / socket.io-client-csharp

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

Updating to version 3.1.1 leads to error CS0118 #350

Open deleojur opened 6 months ago

deleojur commented 6 months ago

I'm not sure whether this is a NuGet problem or a problem specific to this package, but updating to version 3.1.1 leads to some packages not being loaded. This is no problem with version 3.0.8.

It seems to depend on how the package is represented in the Packages folder structure of the project Dependencies. This works fine:

image

This leads to Error CS0118 'SocketIO' is a namespace but is used like a type:

image

Updating to version 3.1.1. means that I have to downgrade to version 3.0.8., then upgrade to version 3.1.1. and hope that it is loaded as shown above. Otherwise, I have to keep repeating this process until it does. I need version 3.1.1. since it otherwise results in issue #349.

If the obj and bin folder have to be deleted, for example when the project binary files cannot be copied properly, this error reoccurs. Any help would be greatly appreciated.

deleojur commented 6 months ago

I fixed this with the help of a colleage:

using SocketIOClass = SocketIOClient.SocketIO;

private SocketIOClass client = new SocketIOClass();
doghappy commented 6 months ago

namespace conflict, caused by this lib, I will find a better solution to fix it