Having similar issue to this
I have determined that I have .NET 4.6.4 Preview or greater on my machine.
This is a Unity C# project! If I open the source project in VS I don’t see the error and project properties shows I am targeting .Net framework 4. So I guess my question is more to do with the way Unity handles .net classes. Confused whether I should be trying to fix this WITHIN VS in the Solution explorer or…?
My understanding is that System.Threading contains the SempahoreSlim class.
I am using source code from this example
Just a partial code listing (first 50 lines of TcpServer)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
namespace tcpServer
{
public delegate void tcpServerConnectionChanged(TcpServerConnection connection);
public delegate void tcpServerError(TcpServer server, Exception e);
public partial class TcpServer : Component
{
private List<TcpServerConnection> connections;
private TcpListener listener;
private Thread listenThread;
private Thread sendThread;
private bool m_isOpen;
private int m_port;
private int m_maxSendAttempts;
private int m_idleTime;
private int m_maxCallbackThreads;
private int m_verifyConnectionInterval;
private Encoding m_encoding;
private SemaphoreSlim sem;
private bool waiting;