업데이트: 2007년 11월
이 예제 프로젝트 파일은 단일 사용자 컨트롤 WPFUserControl이 있는 WPF(Windows Presentation Foundation) 사용자 지정 컨트롤 라이브러리를 위한 것입니다. 주요 구성 정보는 다음과 같습니다.
OutputType. library로 설정됩니다.
WPFUserControl.xaml. Page 요소로 선언된 XAML 파일입니다.
WPFUserControl.xaml.cs. Compile 요소로 선언된 코드 숨김 파일입니다.
참조하는 파일이 참조 중인 위치에 있으면 이 프로젝트 파일을 다시 사용하거나 특정 요건에 맞춰 수정할 수 있습니다. 또는 Microsoft Visual Studio 2005에서 사용자 지정 컨트롤 라이브러리(WPF) 프로젝트 템플릿을 사용하여 자동으로 생성된 사용자 지정 컨트롤용 프로젝트 파일을 가질 수 있습니다.
이 프로젝트 파일은 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>WPFCustomControlLibrary</RootNamespace>
<AssemblyName>WPFCustomControlLibrary</AssemblyName>
<WarningLevel>4</WarningLevel>
<OutputType>library</OutputType>
<ApplicationVersion>1.0.0.*</ApplicationVersion>
</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>
<Page Include="WPFUserControl.xaml" />
<Compile Include="WPFUserControl.xaml.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<AppDesigner Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />
</Project>