tags:

views:

43

answers:

2

Joined a project a week ago. We use Visual Studio 2008 for C#. How do I know the VS project type (Windows Forms Application, WPF Application, Console Application, ...) of the existing project from its property? thanks,

+3  A: 

In the .csproj file there's a property <OutputType>

Winform/WPF:

<OutputType>WinExe</OutputType>

Console:

<OutputType>Exe</OutputType>

Dll (including web applications):

<OutputType>Library</OutputType>

Which gets you part of the way there. To get the definitive answer you could then look for other properties or components which you know to be unique to the project (xaml files in a WPF application for example (thanks JMD)).

ChrisF
To tell the difference between WinForms and WPF: WPF apps will contain .XAML files, and WinForms won't.
JMD
@JMD - indeed. I was just about to update my answer along those lines ;)
ChrisF
do you have a longer list of the values for different projects?
5YrsLaterDBA
@5YrsLaterDBA - no, sorry. I just posted what I happen to have on my machine at the moment.
ChrisF
A: 

You could look at the icons in the Solutions Explorer, but I find those to be too small.

You could also find the .csproj files. If you view them with a text editor, there is a node called that can give you some insight.

Jonathan Bates