How to determine the project type in Visual Studio?

Viewed 49592

How can one determine the "type" of a project in Visual Studio?

For example, if a project is a class library, a web application project, a WinForms project, a WCF project, etc. The icons are obviously different for a lot of them, but is there anywhere where it states the project type?

5 Answers

If the .csproj file has no <ProjectTypeGuids>

As Alex McMillan has pointed out, you could not be able to find the <ProjectTypeGuids> element.

The first answer is correct, except for .dll Library Projects, Console Applications and WinForms Applications as far I know.

They contain <OutputType> (followed by: Library or Exe or WinExe)

and do not contain <ProjectTypeGuids>.

Programmatically, using the EnvDTE namespace, you can investigate the Project.Kind property of the Visual Studio project.

However, if you're interested in a more detailed, the project specification file, i.e. the *.csproj, *.vbproj, among others describes the kind of the project in an XML way.

Easy solution.

If you want to know if it's a WCF Project or ASP.NET Web Service simply open your project's folders in File Explorer. You can hover over the icon with your mouse and a tooltip will display the project type as shown in the picture. Also, you can look under the Type column in File Explorer and it shows it there as well.

WCF Web Service Project: WCF Web Service

ASP.NET Web Service Project: ASP.NET Web Service

Also to note, if your project has a Resources.Designer.cs or Settings.Designer.cs in its Properties folder it's likely a WinForms application.

Related