Posted by Craig L. Finck in General .Net ProgrammingJan 29th, 2011 | Comments Off
A short while back, one of the people on my team sent us an e-mail complaining about his ability to add new items to one of the projects in our VS 2010 solution. He said that he couldn’t add a class and the dialog had no installed templates listed. I wasn’t exactly sure what he meant. I thought he might have just been referring to the MVVM templates, which would have meant he just hadn’t installed them into his Visual Studio 2010 Templates directory. But, when we tried to add a new item to the project in question, this is what we saw:
Empty Add New Item To Project Dialog
The solution was upgraded from an earlier version of Visual Studio, and we hadn’t done too much in it yet. But, we had added new items to several of the projects in the solution. So, this issue was curious for sure. But, our first instinct was to compare the project file with other project files in the solution that worked properly.
Our initial guess was that the project type was probably corrupted in some way that prevented the dialog from knowing what types of files it should offer. And, it didn’t take us long to notice that the ProjectTypeGuids entry was slightly different for the two projects.
The non-working one had:
While the working project had this:
The difference is in the casing of the 2nd guid (which is the guid that designates a Windows C# project).
After we updated the guids to match the casing of the working project, we got this:
- Normal Add New Item To Project Dialog
So, if you ever see this in your projects, take a look at the project file’s ProjectTypeGuids entry to see if there is anything out of the ordinary.