Converting Class library project to MS Test project

Posted by Marcus Hammarberg on September 2, 2008
We have encountered a problem when renaming and restructuring Visual Studio projects. (There are numerous problems with that but here is one that really cause us to ponder for a while.) We create a standard Class Library project and moved some unit test files into it. Of course we should have create a test project instead but now we didn't - ok...

The problem was that the unit tests didn't show up in the test view. The solution was to add the following line into the project file (ripped from a working test project)

The GUID's are probably just my guids but the important stuff is that you'll need to add the projecttypeguids for your project in order to make it a test project.

Oh yeah - you'll need to unload the projectfile and edit it manually in a texteditor. I wrote this in an hurry and missed that little tidbit of information. Sorry.

Published by Marcus Hammarberg on Last updated