Home > DeveloperSection > Interviews > What is the AppManifest.xml file?

Posted on    November-17-2012 7:59 AM

 WPF WPF 
Ratings:
 1 Answer(s)
  2427  View(s)
Rate this:

AVADHESH PATEL

Total Post:257

Points:1285
Posted on    November-17-2012 1:00 AM

First, let?s look at an example AppManifest.xaml file:
Collapse

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
EntryPointAssembly="SilverlightApplication1"
EntryPointType="SilverlightApplication1.App"
RuntimeVersion="2.0.30226.2">
<Deployment.Parts>
<AssemblyPart x:Name="SilverlightApplication1"
Source="SilverlightApplication1.dll" />
<AssemblyPart x:Name="System.Windows.Controls"
Source="System.Windows.Controls.dll" />
<AssemblyPart x:Name="System.Windows.Controls.Extended"
Source="System.Windows.Controls.Extended.dll" />
</Deployment.Parts>
</Deploymnt>

The first element in AppManifest.xaml is a Deployment node. This node defines the application, and contains the child AssemblyPart nodes.

As you can see the AssemblyPart nodes define what assemblies (DLLs) are contained within the .xap file, and give each of them a name.

Now, if you look back up to the top, you'll see the Deployment node has the EntryPointAssembly and EntryPointType attributes. The EntryPointAssembly attribute defines which assembly defined below (as a child AssemblyPart node) is the main assembly (DLL) for the application. And, the EntryPointType attribute specifies the class contained within the assembly (DLL), defined in the EntryPointAssembly attribute, is the main class that will be instantiated to start the application.

The Deployment node also has a RuntimeVersion attribute that defines the version of Silverlight the application is built for.


Don't want to miss updates? Please click the below button!

Follow MindStick