title: How to run a list of tests with VsTest.Console
body: <p>How can I run a list of tests using vstest.console.exe? The .vsmdi format offered a way to specify test lists, but that format is deprecated(?). </p>
  
  <p>I can run an explicit list of tests on the command line, which essentially does exactly what I want, but if the number if tests is large (say a few hundred) then I will run out of command line space! </p>
  
  <pre><code>vstest.console MyTests.dll /Tests:Test1,Test2
  </code></pre>
  
  <p>Is there no way that I can trick vstest.console.exe into running a <em>list</em> of tests defined in any other way? </p>
  
  <p>(edit: emphasis)</p>
  
  <p><strong>Note: I don't want to change the test code, e.g add test category attributes or change naming schemes so name matching will select the subset. I need it to run a list of tests.</strong> </p>
  
  <p>The best I can think of is to run as many as I can fit within the max command line length, and repeat until the set is done, then merge. But if there is some way of loading a legacy vsmdi list or similar it would be a lot easier.</p>
  
  <pre><code>vstest.console MyTests.dll &lt; testnames.txt
  
  vstest.console MyTests.dll /Testlist:testnames.txt
  </code></pre>