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>
...
<projecttypeguids>{guid};{guid}</projecttypeguids>
</propertygroup>
So:
- Right click on the project in question and choose "unload project".
- Right click on the project again (it should now be grey and look something like [project name](unavailable) and select Edit [project name].
- for c# add:
<projecttypeguids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</projecttypeguids> - for vb add:
<projecttypeguids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</projecttypeguids> - Right click once again and choose "Reload project"
Hope this helps someone out there.
No comments:
Post a Comment