How do you tell the Visual Studio project type from an existing Visual Studio project
Asked Answered
B

9

143

Using Visual Studio 2005.

Is there anything in the .sln or .vcproj files (or anywhere else) that defines the project type / subtype?

Edit: What I mean is that when you create a project, you first choose a language (e.g. Visual C#), then a project type (e.g. Windows) and then a subtype (e.g. Console Application).

Where is this information stored within the VS files?

Brigette answered 19/3, 2009 at 1:47 Comment(3)
They should have a icon that represents what language there written in (C#, VB, etc...). I think this is what your talking about.Lohman
Icon? They are text / xml files. I'm looking for something that indicates C## / Console Application or some such.Brigette
Do you mean the output of the project? e.g. application, class library etc?Scibert
B
52

Some further research and I found this:

INFO: List of known project type Guids.

My .sln file contains:

Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddNumbers", "AddNumbers.csproj", "{2C81C5BB-E3B0-457E-BC02-73C76634CCD6}"

The link shows:

Project Type Description Project Type Guid
Windows (C#) {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

So it's Windows C# and the subtype is as per @HardCode's reply. In my case, it's "Console Application".

Brigette answered 19/3, 2009 at 19:28 Comment(2)
Here's another list of known GUIDs: codeproject.com/Reference/720512/…Demiurge
A more up to date list of project type GUIDs is at: https://mcmap.net/q/160764/-visual-studio-project-type-guidsAuthorship
D
71

In the project XML files:

Console applications contain:

<OutputType>Exe</OutputType>

WinForms applications contain:

<OutputType>WinExe</OutputType>

Library (.dll) projects contain:

<OutputType>Library</OutputType>

and do NOT contain a

<ProjectTypeGuids>

ASP.NET and WCF projects contain:

<ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>

The GUIDs do something to define exactly what type of project it is. The ones above were taken from an ASP.NET app. They exist in WCF projects too, and flipping around the GUIDs can fool Vis Studio into changing the project type when you open it.

Decastere answered 19/3, 2009 at 3:14 Comment(6)
.dll projects can contain ProjectTypeGuids, eg for creating a dll for NUnit tests you use <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>Readership
Does project XML files mean the .csproj file?Raseta
@BugalugsNash yes, the .csproj file for a C# project.Decastere
I think project guids method is better. Mine was <OutputType>Exe</OutputType> but it turned out it was a Web Application via the GUIDs rather than a console appPhytology
Here is a list you can use to compare the Guid's to get project types: codeproject.com/Reference/720512/…Marr
A more up to date list of project type GUIDs is at: https://mcmap.net/q/160764/-visual-studio-project-type-guidsAuthorship
B
52

Some further research and I found this:

INFO: List of known project type Guids.

My .sln file contains:

Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AddNumbers", "AddNumbers.csproj", "{2C81C5BB-E3B0-457E-BC02-73C76634CCD6}"

The link shows:

Project Type Description Project Type Guid
Windows (C#) {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}

So it's Windows C# and the subtype is as per @HardCode's reply. In my case, it's "Console Application".

Brigette answered 19/3, 2009 at 19:28 Comment(2)
Here's another list of known GUIDs: codeproject.com/Reference/720512/…Demiurge
A more up to date list of project type GUIDs is at: https://mcmap.net/q/160764/-visual-studio-project-type-guidsAuthorship
A
10
  1. Right Click on Project of a solution.
  2. Open Properties -> Application Tab.
  3. On the right you can see 'Output Type' which defines your project type of an existing solution.
Aphrodite answered 4/6, 2020 at 11:33 Comment(1)
The OP was asking for the specific project type selected when the project was created in VS, such as "ASP.NET Core Web App". Going to the Application Tab under the Properties in my ASP.NET Core Web App project in VS 2022 shows the "Output Type" merely as "Console Application", and gives no indication whatsoever as to the original selected project type. I'm surprised that the original project type does not appear to be preserved in a string property somewhere in the project properties or config files, forcing devs to futz around with looking up GUIDs... Ugh.Mandibular
R
6

The .vsproj file defines the project type. For example, the following defines a C++ project.

<VisualStudioProject
   ProjectType="Visual C++"

The project tag also includes the compiler version.

Residentiary answered 19/3, 2009 at 2:39 Comment(1)
As a note, I believe the extension is: .vcproj :)Songwriter
D
4

Double-click on "My Project" in the Solution Explorer, and look at the "Application type:" ComboBox. It tells you (and lets you change) the project type.

Deccan answered 19/3, 2009 at 2:47 Comment(7)
Don't know about double-click? I get there from "Project / Properties".Brigette
Same thing. You know Microsoft - three ways to get to any function. I'm sure there is a keyboard shortcut, too.Deccan
Where is that Application type combobox?Piton
Yeah, where is it? Closest thing I see is Output type under Application.Clarino
Yep, it's Output Type.Marielamariele
I may be different between VB.NET and C# projects.Deccan
Output Type in Project PropertiesFredericafrederich
P
4

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.

Preciado answered 20/8, 2020 at 19:16 Comment(1)
The OP is looking for the specific project type name selected when the project was created in Visual Studio. Tool tips and file types displayed in Windows File Explorer do not give that information. They can be used to deduce the broad category that the project falls under (such as WCF versus ASP.NET), but will not give you the specific project type originally selected.Mandibular
S
2

If you are interested in finding subtypes of a project i.e. Under C# Windows Project Category, checking whether it is a Windows Form Application or WPF

Try adding new item in the project and it will show you the items specific to that project type along with default options.

For instance if there is a WPF project it shows the WPF related options like 'Window' , 'Page' 'User Control' ... In case of Window Form Application it Shows 'Window Form' etc.....

Showker answered 19/3, 2009 at 1:47 Comment(0)
P
2

Follow: Solution Explorer -> hover/right click over your project item ( not the project folder. Check the Properties view to find if you clicked on the folder or the project) -> Properties. Then all information is available for the project.

Patrinapatriot answered 18/4, 2019 at 0:5 Comment(0)
A
0

Right click on solution and click open folder in file explorer. Navigate to Project file. hover on it, tool tip displays the type of project file.

Assortment answered 24/4, 2019 at 6:38 Comment(1)
The OP is looking for the specific project type selected when creating the project in Visual Studio. The tooltips that display in the Windows File Explorer when you hover over specific files in a project only show info like "C# Project File" and "JSON File" and do not give any info as to the originally selected project type.Mandibular

© 2022 - 2024 — McMap. All rights reserved.