Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

People also ask

How do I know the project type in Visual Studio?

If you are working in Visual Studio, you can quickly check the project format using one of the following methods: Right-click the project in Solution Explorer and select Edit myprojectname. csproj. This option is only available starting in Visual Studio 2017 for projects that use the SDK-style attribute.

How do you determine a project type?

Right click on the project and select Properties, select Application and check the Output Type. This will identify what sort of assembly is being created. As for WCF, Web Api or Windows Service, this can be identified by the references that are included.

How do I change the project type in Visual Studio?

The only thing that can really be changed in terms of the project type is essentially the output type. This can have value Class Library, Console Application and Windows Application. You can change this by going to the project property page (right click Properties) and change the Output Type combo box.

What is SDK-style project?

Each project SDK is a set of MSBuild targets and associated tasks that are responsible for compiling, packing, and publishing code. A project that references a project SDK is sometimes referred to as an SDK-style project.


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.


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".


The .vproj 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.


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.


  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.

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.....


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.