Gotchas: MSTest test projects don’t load on VS Pro

Friday, October 26, 2007 – 8:36 AM

As is always the way. In the process of writing my last post I found something else that has caught me out in the past.

Now it’s important to note that this is by design. VS Pro 2005 does not support testing projects. The really good news is that it will in the upcoming release of VS but for now you’re somewhat stuck right?

Right now you want to load a existing┬átest project and convert it to (say) NUnit or Attempts to load the project are met with a cheery “The project type is not supported by this installation” dialog. The project is included in the solution but is marked as “unavailable”. So how do you get to at least edit the code in the editor?

  1. Right click on the project and choose “Edit …” to open the project file as XML.
  2. Delete the line that looks like this:
  3. Save and close the XML file.
  4. Right click on the project and reload it.

Done! VS no longer considers this a test project. You can use the same trick in reverse if you want to convert an existing project to be one the MSTest will interact with.

Sorry, comments for this entry are closed at this time.