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?
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.
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.
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.
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.
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.
.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>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With