2

It happened in VS2010 that when creating project, .csproj file didn't generate some tag ProjectTypeGuids in the first PropertyGroup.

This had consequence that I couldn't see in TestView window any MS unit test in that project, nor execute it.

I copied ProjectTypeGuids from some other .csproj file where tests worked, and it worked, by explanation of MoCapitan in: MSTest Not Finding New Tests

Does anyone knows what is ProjectTypeGuids, why UnitTests are not working without it and what is the reason for VS to generate or to omit it?

Community
  • 1
  • 1
  • The guid determines what add-ins are loaded when VS opens a project. 3AC096D0-A1C2-E12C-1390-A8335801FDAB is an important one, that says "I'm a Test project, please load the Test support add-ins". If it is missing then that of course can't work. It shouldn't be missing, there's no hint whatsoever in your question what might cause that. – Hans Passant Oct 15 '15 at 22:41

1 Answers1

0

ProjectTypeGuids is list of "guid that identifies project type". So if you are missing "this is Unit test project" guid than default VS infrastructure will not try to look for tests in that project (other test runners like R# may still run such tests).

If you created project as regular "class library" (instead of "Unit tests project") than the guids will be missing.

Partial list of types: http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
  • Thanks for good and fast answers. Now it is clear that I created a testing project as "class library" because I didn't know that there are .csproj additional specifics that must be configured to support. And it is not as obvious as it is obvious that TestProject really is "class library" and needs reference to Unit Test library. P.S. consider your answer marked as useful by me, because I don't have reputation to do it :-) – Nemanja Avramovic Oct 17 '15 at 07:24