tags:

views:

83

answers:

1

We had a test project that started out as MbUnit v3 / Gallio but decided to go to MSTest. We took out the Gallio/MbUnit tests and added the reference to the MSTest stuff (Microsoft.VisualStudio.QualityTools.UnitTestFramework) and swapped out the C# attributes to use MSTest verbiage ([TestMethod], etc), but when attempting to run tests Visual Studio doesn't see the tests at all. Everything compiles fine, but the Tests view is completely empty.

The syntax of the text is exactly the same as any other MSTest project. I'd rather know what's different about this project and hand-merge whatever VS is looking for than delete and recreate the test project since the project is already in TFS and don't want delete history.

Thanks for any help.


Problem solved, it was my fault. I forgot to add [TestClass] to the class. Lame.

A: 

Make a backup copy of the csproj file. Open your test projcet file(.csproj) and replace the ProjectTypeGuids node with the following value.

<PropertyGroup>
......
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>

{3AC096D0-A1C2-E12C-1390-A8335801FDAB} means test project. {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} means 2008 solution.

Claudiu
hrm I had that already
stimpy77
I've just replaced that entire <PropertyGroup> with one generated by a new Test Project, still it does not see my tests.
stimpy77
Found the problem. I forgot [TestClass] on the class.
stimpy77