Skip to content

Instantly share code, notes, and snippets.

@slimflem
slimflem / ServiceHost.xml
Created September 1, 2013 21:02
This csproj file snippet shows PropertyGroup elements allowing to build a Console application as a Windows Service for Release Configuration and a standard Console application when in Debug. notice Debug is Exe (Console) and Release is WinExe (Windows Service).
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<OutputType>Exe</OutputType>