Reputation: 30047
I have a set of 6 MSTest test assemblies. When I bring up the Test View window and group by Project all of my projects show up save one. I cannot seem to make Visual Studio understand that this project is a unit test assembly.
Resharper's Unit Test Runner has no problem identifying this sixth assembly. So the assembly is fine from that stand point.
How does Visual Studio 2008 determine that an assembly is a unit test assembly?
I have compared the csproj files and found nothing out of the ordinary.
Upvotes: 7
Views: 4121
Reputation: 30047
When creating a "Test" project in Visual Studio, the following element is added to the csproj xml in the very first PropertyGroup element:
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
If you created your test assembly by hand, say by creating a new Class Library and adding a reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework, this element will not be in your csproj file and visual studio will ignore all the tests located inside.
Add the element and all will be good again.
Upvotes: 28