title: System.Management error in UWP
body: <p>I am writing an app to read current screen brightness and set it pragmatically. After doing some search, I found the following code which requires <strong>System.Management</strong> dll</p>
  
  <pre><code>static byte GetBrightness()
          {
              ManagementScope s = new ManagementScope("root\\WMI");
              SelectQuery q = new SelectQuery("WmiMonitorBrightness");
  
              ManagementObjectSearcher mos = new ManagementObjectSearcher(s, q);
  
              ManagementObjectCollection moc = mosGet();
  
              byte curBrightness = 0;
  
              foreach (System.Management.ManagementObject o in moc)
              {
                  curBrightness = (byte)o.GetPropertyValue("CurrentBrightness");
                  break; 
              }
  
              moc.Dispose();
              mos.Dispose();
  
              return curBrightness;
          }
  
  static void SetBrightness(byte targetBrightness)
          {
             ManagementScope s = new ManagementScope("root\\WMI");
  
              SelectQuery q = new SelectQuery("WmiMonitorBrightnessMethods");
  
              ManagementObjectSearcher mos = new ManagementObjectSearcher(s, q);
  
              ManagementObjectCollection moc = mos.Get();
  
              foreach (System.Management.ManagementObject o in moc)
              {
                  o.InvokeMethod("WmiSetBrightness", new Object[] { UInt32.MaxValue, targetBrightness }); 
              }
  
              moc.Dispose();
              mos.Dispose();
          }
  </code></pre>
  
  <p>I was able to add <strong>System.Management</strong> dll in UWP. But when I build, I get the following errors : </p>
  
  <p><strong>C# Reference to type 'Component' claims it is defined in 'System', but it could not be found</strong></p>
  
  <p>Is there any way to achieve this in UWP?</p>