Sunday, November 20, 2011

AppManifest.xaml file?

The AppManifest.xml file defines the assemblies that get deployed in the client application. This file is automatically updated when compiling your application.
Basic example:

<deployment entrypointassembly="MySimpleSilverlight" entrypointtype="MySimpleSilverlight.App" runtimeversion="3.0.40624.0" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns="http://schemas.microsoft.com/client/2007/deployment">
<deployment.parts>
<assemblypart source=" MySimpleSilverlight.dll" x:name="MySimpleSilverlight">
<assemblypart source="Microsoft.Maps.MapControl.Common.dll" x:name="Microsoft.Maps.MapControl.Common">
<assemblypart source="Microsoft.Maps.MapControl.dll" x:name="Microsoft.Maps.MapControl">
</assemblypart></assemblypart></assemblypart></deployment.parts>
</deployment>
Based on the settings of a referenced assembly it is added to the Application manifest. For example, if you have an assembly that you are referencing in your application but do not wish to have it included into the. XAP file you can choose to set “Copy Local” to false. See the image below:

In this example I’m referencing the Microsoft.Maps.MapControl.Common assembly and chose not to have a local copied deployed with the .XAP. I’ll then need to add “on demand download of the assembly” when accessing it in my code.
This can be useful to have only your base assembly deployed and have an on demand download of subsequent assemblies on the fly so that your initial download time is minimal. When only a part of your application uses a specific assembly you may want to use this mechanism.

No comments:

Post a Comment