title: "ManagementScope " could not be found
body: <p>I'm getting this error:</p>
  
  <p><code>CS0246: The type or namespace name 'ManagementScope' could not be found...</code></p>
  
  <p>On this line:</p>
  
  <pre><code>private ManagementScope plainScope = null;
  </code></pre>
  
  <p>The project builds fine, however I get the above compiler error during runtime when I try to load any page. Yes, I have the appropriate <code>using System.Management</code> statement. Yes, I have included <code>System.Management</code> as a reference. This is my using statement block:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data;
  using System.Management;
  </code></pre>
  
  <p>I have read <a href="https://stackoverflow.com/questions/4228992/namespace-not-recognized-even-though-it-is-there">this question</a>, and my project is targeting the .Net 3.5 Framework, not 4. In case it helps, the offending code is inside a class file which is included in the App_Code directory of the project. The "Build Action", under Advanced Properties of the file is set to "Compile". I believe that this might have something to do with the problem seeing as I was using the <code>System.Management</code> namespace recently in the code-behind of an <code>aspx</code> file and it compiled and ran just fine.</p>