title: Platform Not Supported Exception
body: <p>I'm developing a C# app and I want my app works on both Windows10 and Windows7.
  To perform a Bluetooth scan I must use 2 different Libraries. One is for windows7 and the other is for Windows10.</p>
  
  <p>I have made a verification code to detect if the app is running on Win10 or Win7.
  After that I use the correct Libraries.</p>
  
  <p>The problem is on windows7 My app crashes with a Platform Not Supported Exception.
  This is because in my code there is a Win10 lib that is not supported, but this lib is not used in windows7 due to my verification code.
  The Win10 lib is "Windows.Devices.Bluetooth.Advertisement".</p>
  
  <p>So, how can I do to avoid my app crashes.</p>
  
  <p>This is a sample code (Not a working code just an example):</p>
  
  <pre><code> using Windows.Devices.Bluetooth.Advertisement;
  
   namespace ConsoleApp1
   {
       class Program
       {
           static void Main(string[] args)
           { 
               String System = "Windows7";
               if (System == "Windows7")
                   Console.WriteLine("Win7");
              else
               {
                   var watcher = new BluetoothLEAdvertisementWatcher();
                   watcher.Received += Watcher_Received;
                   watcher.Start();
                   Console.WriteLine("Win10");
               }
           }
  
           private static void Watcher_Received(BluetoothLEAdvertisementWatcher sender,
               BluetoothLEAdvertisementReceivedEventArgs args)
           {
               Console.WriteLine("Device detected");
           }
  
  
       }
   }
  </code></pre>
  
  <p>To use it add a refrence to Windows.winmd. You can find this file in the windows10 Dev Kit.</p>