title: Cannot Run Unit Tests for Windows Store apps in Visual Studio 2012
body: <p>I can't seem to run unit tests for Windows store apps using Visual Studio 2012.</p>
  
  <p>I have gone through the following steps in order to configure my application.  </p>
  
  <ol>
  <li>I create a windows store project.  I build it and get it to run just fine.</li>
  <li>I than right click on the solution and click Add > New Project.   From the 'Add New Project Menu' I select the project template 'Unit Test Library (Windows Store apps) and click okay creating the project.</li>
  <li>I create a basic unit test that looks something like the following.</li>
  </ol>
  
  <p><b></b></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
  
  namespace UnitTestLibrary1
  {
    [TestClass]
    public class UnitTest1
    {
      [TestMethod]
      public void TestMethod1()
      {
        string a = "a";
        string b = "b";
  
        Assert.AreEqual(a, b);
      }
    }
  }
  </code></pre>
  
  <p>**Note as per the <a href="http://msdn.microsoft.com/en-us/library/vstudio/hh440545.aspx" rel="nofollow noreferrer">instructions found on the MSDN website here I have not built the Unit Test project yet </a></p>
  
  <p>4 - I open the Visual Studio test explore which displays the following. </p>
  
  <p><img src="https://i.stack.imgur.com/KSFS5.png" alt="enter image description here"></p>
  
  <p>5 - I proceed to build the entire solution (below is the build output)</p>
  
  <pre><code>1&gt;------ Build started: Project: vevo.pushclient, Configuration: Debug Any CPU ------
  2&gt;------ Build started: Project: UnitTestLibrary1, Configuration: Debug Any CPU ------
  2&gt;  UnitTestLibrary1 -&gt; C:\Source\simple_push_client\vevo.pushclient\UnitTestLibrary1\bin\Debug\UnitTestLibrary1.dll
  1&gt;  vevo.pushclient -&gt; C:\Source\simple_push_client\vevo.pushclient\vevo.pushclient\bin\Debug\vevo.pushclient.exe
  ========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>The following was the output from Tests, I tried googling the error but could not find any helpful answers</p>
  
  <pre><code>------ Discover test started ------
  MSTestAdapter failed to discover tests in class 'UnitTestLibrary1.UnitTest1' of assembly 'C:\Source\simple_push_client\vevo.pushclient\UnitTestLibrary1\bin\Debug\UnitTestLibrary1.dll'. Reason Method not found: 'System.String Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestCategoryBaseAttribute.get_TestCategory()'..
  NUnit 0.97.0.0 discovering tests is started
  NUnit 0.97.0.0 discovering test is finished
  ========== Discover test finished: 0 found (0:00:00.1800223) ==========
  </code></pre>
  
  <p>The Test Explorer still showed the same message as before the build that stated 'Build your solution to discover all available tests....</p>
  
  <p>Even so I tried clicking run all.</p>
  
  <p>This resulted in the following output for the build </p>
  
  <pre><code>========== Build: 0 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>And no output for Tests</p>
  
  <p>Needless to say no tests were shown as having been run, passed, skipped, or failed in the test explorer. </p>
  
  <p>I ensured that the configuration Properties of the UnitTest project were set to build and deploy and attempted to build using each platform configuration (Any CPU, x86, and x4)</p>
  
  <p><img src="https://i.stack.imgur.com/IyumD.png" alt="enter image description here"></p>