title: How to Exclude a test from running using VS2012, TFS Build and NUnit
body: <p>I have the following setup
  Visual studio 2012 Update 2
  NUnit Test Adapter Beta 4 
  NUnit 2.62</p>
  
  <p>I mark a test with either of the following attributes  Category from NUnit or TestCategory from MSTest:</p>
  
  <pre><code>[Category("WebServer")]
  public void FooTest() {
   //test
  }
  
  
  [TestCategory("WebServer")]
  public void FooTest2() {
   //test
  }
  </code></pre>
  
  <p>In the TFS Build Template, I Set the property</p>
  
  <ol>
  <li>Basic -> 1. Test Source -> Test Case Filter to the value:  <strong>TestCategory!=WebServer</strong></li>
  </ol>
  
  <p>When the build executes NO TESTS execute.  Removing the Filter and all tests run again.</p>
  
  <p>The output from the build log is</p>
  
  <p><em>No test is available in C:\Builds\2\Proj\Build\bin\Debug\Tests.Integration.dll C:\Builds\2\Proj\Build\bin\Debug\Tests.Unit.dll C:\Builds\2\Proj\Build\bin\Debug\Tests.Web.dll C:\Builds\2\Proj\Build\bin\Debug\TestStack.BDDfy.dll. Make sure that installed test discoverers &amp; executors, platform &amp; framework version settings are appropriate and try again.</em></p>
  
  <p>Any clues how I can get a test to be excluded base on Category name?
  I can easily verify the attribute works if I use the NUnit console runner.</p>