Where is the Microsoft.VisualStudio.TestTools.UnitTesting namespace on VS2010?

I converted a VS2008 solution that contains some unit testing projects to VS2010. After the conversion I tried to compile the solution, but I'm getting the following error:

The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

The namespace declaration cannot be found using Microsoft.VisualStudio.TestTools.UnitTesting;. In addition, I couldn't find the Microsoft.VisualStudio.QualityTools.UnitTestFramework assembly when I tried to add a new project reference.

Does anyone know what I'm doing wrong?


It's called Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll.

You can find it in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll.


I just had this problem as well, and with a Microsoft.Data.Schema library as well. The answer is correct, in that these library are on the machine and in the VS 10.0 directory.

The problem (at least for me) was that the solution was converted from VS2008 and the conversion utility targetted the project for .NET 3.5. Since the 10.0 library require .NET 4.0 they are not picked up by the compiler.

The solution is to either revert to use VS2008 where these resolve correctly; or to switch the project to compile for .NET 4.0 so you can use the available libraries.