Wednesday, 31 October 2007

Turning a c# project into a test project

Ever added a C# project by accident when you meant to add a Test project? And only realized after writing a test, adding all the references and not finding it in test manager?

I have; and I can never remember exactly how to fix it. I'll post the steps here so I can find it in the future, and maybe help other people with the same issue.

Test projects are aggregate projects (language and type) and these properties are set under an element in the project file called projecttypeguids.

A test project looks a little like this:

<propertygroup><configuration condition=" '$(Configuration)'== '' ">Debug</configuration>


  1. Right click on the project in question and choose "unload project".
  2. Right click on the project again (it should now be grey and look something like [project name](unavailable) and select Edit [project name].
    1. for c# add:
    2. for vb add:
  3. Right click once again and choose "Reload project"

Hope this helps someone out there.

    No comments: