views:

168

answers:

6

When I try to load a solution, I get the following error:

The project file [filepath] cannot be opened. The project type is not supported by this installation.

After hitting OK twice, my solution loads fine except for the two test projects (the [filepath] above references these two test projects), which are greyed out. When I try to expand them, they show the message:

The project file cannot be loaded.

I am running VS08 Pro SP1 and .NET 3.5 SP1. The test projects were also created in Pro. There are two weird components to this problem:

  1. When attempting to "repair" the VS installation, it says that tests are already installed. This is evident by the "Test" option in the menubar at the top of VS.
  2. If I wanted to create a new test project, VS gives me the option at the creation dialog.

I have seen this question and tried implementing the answer via the VS command line prompt but no dice.

Does anyone know what the heck is going on here?

A: 

You're probably using the Express edition of Visual Studio, which doesn't include the unit testing feature.

EDIT: Since you have the Test menu, you obviously aren't using the Express edition. I'm keeping this answer for reference.

SLaks
A: 

It might be problem with that specific test project. What kind of test project is it?

If you create a new Test project, do you get any errors?

Which edition of Visual Studio are you using?

Some kinds of test projects are only supported by Team Suite.

SLaks
it's just a VS test project... VS is Pro, not Team
Jason
A: 

What kind of Test Project is it? maybe you're opening Test Project specific for Team edition on VS2008 Pro.

Ferry Meidianto
it's a VS test project created in VS Pro
Jason
+1  A: 

As SLaks already asked, can you create new Test projects on the computer having issues? If you are able to create new ones without issue, try running a diff between the good project file and a bad one. This may show you if you are running two different versions - likely the bad projects have something included that is incompatible with your installation.

Pedro
A: 

Here's now you can edit the project file so that it will load in VS versions which do not support testing:

http://www.ademiller.com/blogs/tech/2007/10/gotchas-mstest-test-projects-dont-load-on-vs-pro/

  1. Right click on the project and choose “Edit …” to open the project file as XML.
  2. List item
  3. Delete the List item line that looks like this:

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

  4. Save and close the XML file. Right click on the project and reload it.

You need to remove the project GUIDs that tell VS it's a test project and not actually supported on your version of VS. This will allow the project to load but obviously if you don't have the testing features MSTEST will not be available to run the tests.

If you're version of VS supports testing then check and see if this line is in the project file.

Ade Miller
A: 

Did you create or edit the test project while evaluating ReSharper, then the eval license expired? There may be some residual "stuff" that ReSharper put in the test project file.

I would try SLaks/Pedro's solution of creating a new test project to see if perhaps something broke in VS, or your project file was corrupted.

Therealstubot