업데이트: 2007년 11월
이 예제 프로젝트 파일은 XAML(Extensible Application Markup Language) 없이 코드로만 작성된 WPF(Windows Presentation Foundation) 독립 실행형 응용 프로그램용 파일입니다. 주요 구성 정보는 다음과 같습니다.
OutputType. winexe로 설정됩니다.
모든 C# .cs 코드 파일. Include 특성이 *.cs로 설정된 Compile 요소를 사용하여 자동으로 컴파일됩니다.
참조하는 파일이 참조 중인 위치에 있으면 이 프로젝트 파일을 다시 사용하거나 특정 요건에 맞춰 수정할 수 있습니다. 또는 Microsoft Visual Studio 2005에서 Windows 응용 프로그램(WPF) 프로젝트 템플릿을 사용하여 자동으로 생성된 독립 실행형 응용 프로그램용 프로젝트 파일을 가질 수 있습니다. 그리고 기본으로 생성된 코드와 XAML 파일(App.xaml, App.xaml.cs, Window1.xaml 및 Window1.xaml.cs)을 제거해야 합니다.
이 프로젝트 파일은 C# 프로젝트용이며 여기에는 Microsoft.CSharp.targets Import 요소가 포함됩니다. Microsoft Visual Studio 2005에서는 C# 프로젝트 파일에 .csproj 확장명을 부여합니다. Microsoft Visual Studio 2005에서 만든 Microsoft Visual Basic .NET에는 일반적으로 .vbproj 확장명이 지정되며 Microsoft.VisualBasic.Targets Import 요소가 포함됩니다.
예제
<Project DefaultTargets="Build" xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<RootNamespace>WPFStandaloneApplicationCodeOnly</RootNamespace>
<AssemblyName>WPFStandaloneApplicationCodeOnly</AssemblyName>
<WarningLevel>4</WarningLevel>
<OutputType>winexe</OutputType>
<ApplicationVersion>1.0.0.*</ApplicationVersion>
<BootstrapperEnabled>false</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>.\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<OutputPath>.\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Compile Include="*.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />
</Project>