title: How can I filter NUnit tests when running vstest.console.exe
body: <p>I have a suite of automated tests (some with SpecFlow, some with NUnit), that I run as part of my TFS build (using visual studio online, with a hosted build agent).</p>
  
  <p>Some of my tests (acceptance tests, not unit tests) cannot be executed on the build server, because they make an assumption about the credentials of the user logged into the system.</p>
  
  <p>I want to be able to filter out these tests from my run, and run everything <strong>except for</strong> the local-only tests. </p>
  
  <p>In order to achieve this, I added the <code>[Category("LocalOnly")]</code> attribute to the tests to be ignored by the TFS server, and set the test task in the build (new preview build mechanism) to add the following switch: <code>/TestCaseFilter:"TestCategory!=LocalOnly"</code>.</p>
  
  <p>Except it doesn't work, even though I believe it should. If I set the filter with the equals sign it runs nothing, and if I use the not-equals sign, it runs everything. It seems that the filter isn't working.</p>
  
  <p>I also tried to run this locally on my box, using vstest.console.exe, with the exact same results, so this is not a problem with TFS).</p>
  
  <p>According to the NUnit adapter for visual studio release notes, this has been fixed, but I see no evidence of it.</p>
  
  <p>Any idea how to fix this?</p>