How to determine the project type in Visual Studio?
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>
.
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.