In Visual Studio, the context menu command for adding an element in a WinForms project is different by the one showed for a WPF project. In fact, I can see “Add->Windows Form” in the first and “Add->Window” in the second. By which parameter/configuration VisualStudio can differentiate which kind of project is currently opened? My first bet was the .csproj file but I can see nothing distinctive about the project type.
Share
There is often a
ProjectTypeGuidselement in the project file that allows Visual Studio to determine what project type it is. It’s also stated in the solution file, referencing the project.as an example.
Here’s a somewhat old link to a list of project guids, but most are still valid: http://onlinecoder.blogspot.se/2009/09/visual-studio-projects-project-type.html
And here’s a blogpost, outlining what it’s all about: