20

Could you please tell me how to determine the type of an existing .NET project in Visual Studio? By the project type I mean: C# application, WPF application, etc.

I have been transfered a bunch of projects from my coworker. There are many Library projects, each of them does a separate job such as: Declare entities, do sync.

All of them have the same icon on Visual Studio Solution Explorer. I just want to know which template these projects based on.

Super Jade
  • 5,609
  • 7
  • 39
  • 61
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
  • That's not a *project type*, that's a *template* that the project was based upon. So, I doubt determining which template a given project came from is always possible, because a project may just have been altered sufficiently to not match any of the templates in the end. – O. R. Mapper Nov 28 '12 at 07:43
  • Possible duplicate of [determine project type in visual studio](https://stackoverflow.com/questions/1031952/determine-project-type-in-visual-studio) – Ash Jul 05 '17 at 03:32

4 Answers4

18

I guess by project type you think of the project template used to create the project...

to find the output type right click on Project -> Properties -> Application -> Output Type

As for the difference between c# and other projects: c# project files have the file extension .csproj while i.e. VB projects use .vbproj

Reza NA
  • 75
  • 8
user1859022
  • 2,585
  • 1
  • 21
  • 33
17

One of the XML Tags inside the project's .csproj/.vbproj file is the <ProjectTypeGuids> element.
This tag holds the type of the project.

Here is a translation from the GUID to the type of the project

So a WPF project, written in C# will have 2 GUIDs, one for WPF and one for C#:

<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Yet a WPF project in VB.Net will look like this:

<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

Notice the first GUID is the same since it's a WPF application, the second GUID changed to reflect C# vs VB.Net

Blachshma
  • 17,097
  • 4
  • 58
  • 72
0

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.

Andrew Reese
  • 854
  • 1
  • 11
  • 27
0

To determine if a project is an application vs a library find the Output Type. In Visual Studio:

  1. Right click on the project
  2. Click Properties > Application > Look under "Output type:"
  3. It will be a "Console Application", "Windows Application", or "Class Library"
Rj Pikus
  • 1
  • 2