title: The type or namespace 'Semaphore Slim could not be found
body: <p>Having similar issue to this </p>
  
  <p><a href="https://stackoverflow.com/questions/15658318/using-semaphore-in-c-sharp">using semaphore in c#</a></p>
  
  <p>I have determined that I have .NET 4.6.4 Preview or greater on my machine.</p>
  
  <p>So what gives?
  My understanding is that System.Threading contains the SempahoreSlim class.</p>
  
  <p>I am using source code from this example
  <a href="https://www.codeproject.com/articles/488668/csharp-tcp-server" rel="nofollow noreferrer">https://www.codeproject.com/articles/488668/csharp-tcp-server</a></p>
  
  <p>Just a partial code listing (first 50 lines of TcpServer)</p>
  
  <pre><code>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&lt;TcpServerConnection&gt; 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;
  </code></pre>