Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine the project type in Visual Studio?

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?

like image 525
raklos Avatar asked Jun 23 '09 11:06

raklos


People also ask

How do I know the type of project 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.

What is project type in Visual Studio?

Visual Studio includes several project types for languages such as Visual C# and Visual Basic. Visual Studio also lets you create your own project types.

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.

How do I know the project template in Visual Studio 2019?

For example, you can right-click the project > click properties > select Application and see(refer to) the related information, for example, Output type -- Windows Application, Console Application, Class Library… Or you can find some related information about the project type from items, files etc.


2 Answers

One simple trick is drag and drop project file in notepad and where you can see this kind of stuff<

<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">   <PropertyGroup>`enter code here`     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>     <Platform Condition=" '$(Platform)' == '' ">x86</Platform>     <ProductVersion>8.0.30703</ProductVersion>     <SchemaVersion>2.0</SchemaVersion>     <ProjectGuid>{27F8327B-239F-4125-809C-13FB6209D2E3}</ProjectGuid>     <OutputType>WinExe</OutputType>`enter code here`     <AppDesignerFolder>Properties</AppDesignerFolder>     <RootNamespace>WpfApplication1</RootNamespace>     <AssemblyName>WpfApplication1</AssemblyName>     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>     <TargetFrameworkProfile>Client</TargetFrameworkProfile>     <FileAlignment>512</FileAlignment>     <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>     <WarningLevel>4</WarningLevel>   </PropertyGroup> 

Compare "ProjectTypeGuid" with this Link. by changing this guid you can add WPF window to WinForms project.

like image 132
user781700 Avatar answered Sep 17 '22 13:09

user781700


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

like image 34
Marco D.G. Avatar answered Sep 19 '22 13:09

Marco D.G.