title: Is it possible to use Wi-Fi Direct from a non Universal application?
body: <p>I've been trying to code a simple <strong>command-line based application</strong> (using C# and .NET from Visual Studio 2015 and Windows 10) to start a Wi-Fi Direct advertiser following <a href="https://github.com/Microsoft/Windows-universal-samples" rel="noreferrer">Microsoft's Universal Samples</a>, but manually adding references to the necessary *.dll and *.winmd assemblies instead of creating a UniversalWindowsPlatform project. (System.Runtime.WindowsRuntime from Refference Assemblies and Windows from Windows Kits\10\Union Metadata\Windows.winmd)</p>
  
  <p>This is the relevant code:</p>
  
  <pre><code>public void StartAdvertisement(WiFiDirectAdvertisementListenStateDiscoverability discoverability,
          bool listenToConnections)
      {
          if (mPublisher == null)
              mPublisher = new WiFiDirectAdvertisementPublisher();
  
          if (listenToConnections)
          {
              mListener = new WiFiDirectConnectionListener();
              mListener.ConnectionRequested += OnConnectionRequested;
          }
  
          mPublisher.StatusChanged += OnStatusChanged;
          mPublisher.Advertisement.IsAutonomousGroupOwnerEnabled = true;
          mPublisher.Advertisement.ListenStateDiscoverability = discoverability;
          mPublisher.Start();
      }
  
  async void OnConnectionRequested(WiFiDirectConnectionListener sender,
          WiFiDirectConnectionRequestedEventArgs connectionEventArgs)
      {
      // Connection code
      }
  </code></pre>
  
  <p>The advertiser starts OK (it can be found from other devices, and it creates the necessary network interface), but the OnConnectionRequested method doesn't get called when other devices attempt to connect. I've seen that for using Wi-Fi Direct, an Universal Windows Application must add to its manifest the <a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj835817.aspx" rel="noreferrer">proximity capability</a>, but for a <em>generic</em> application, there is no manifest.</p>
  
  <p>Can I use the Windows 10 WiFi Direct API from a non-universal Windows application only by referencing the necessary assemblies?</p>