Visual Studio 2012 unable to find my tests

c#, unit-testing, visual-studio

Solution

Try adding a reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework, which can be found in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies

Then also make sure that you are using the assemblies that you added reference to.

using Microsoft.VisualStudio.TestTools.UnitTesting;

and remove the old

using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;

EDIT

You could also just update your visual studio to update 3, which should solve this problem

Problem

I have added a "Unit Test Library" project to my solution containing a simple test class: ``` namespace Metro_test { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { Assert.Equals(0, 1); } } } ``` But I am unable to make the test show up in the text explorer window. I have tried cleaning/rebuilding the solution, removing/re-adding references to MSTest and editing the .csproj file to make sure the project is marked as a test-project. The whole solution is under source control and my colleague (working with the same code) is having no problem running the test. Any ideas?

Original source