Building a Longhorn Library Assembly


You ll also want to build libraries in addition to executable applications. The primary differences between an application project and a library project are these:

  • A library project sets the value of the TargetType property to Library .

  • A library project typically does not include an application definition item.

Here s an example of a project file that creates a library:

 <Project DefaultTargets="Build"> 
<PropertyGroup>
<Property Language="C#" />
<Property DefaultClrNameSpace="IntroLonghorn" />
<Property TargetName="MyLibrary" />
<Property TargetType="Library" />
</PropertyGroup>

<Import Project="$(LAPI)\WindowsApplication.target" />

<ItemGroup>
<Item Type="Pages" Include="ErrorPage.xaml" />
<Item Type="Code" Include="ErrorPage.xaml.cs"/>
<Item Type="Code" Include="Utilities.cs"/>

<Item Type="DependentProjects" Include="MyDependentAssembly.proj" />

<Item Type="Components" Include="SomeThirdParty.dll" />

<Item Type="Resources" Include="Picture1.jpg"
FileStorage="embedded" Localizable="False"/>
<Item Type="Resources" Include="Picture2.jpg"
FileStorage="embedded" Localizable="True"/>
</ItemGroup>
</Project>



Introducing Microsoft WinFX
Introducing WinFX(TM) The Application Programming Interface for the Next Generation of Microsoft Windows Code Name Longhorn (Pro Developer)
ISBN: 0735620857
EAN: 2147483647
Year: 2004
Pages: 83
Authors: Brent Rector

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net