We may face to the problem that how to reduce the size of XAP file in Silverlight, there is the solution:
- Move to Silverlight project and right click, open property window, then check the option as below,
- Specify the reference path to a folder, e.g. ~/SharedLib/
- Add the XML format for each of your assemblies under SharedLib folder, e.g. System.Xml.Linq.dll
- create a new XML File named as : System.Xml.Linq.extmap.xml
- Fill this XML file with contents as below and save
<?xml version="1.0"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<assembly>
<name>System.Xml.Linq</name>
<version>2.0.5.0</version>
<publickeytoken>31bf3856ad364e35</publickeytoken>
<relpath>System.Xml.Linq.dll</relpath>
<extension downloadUri="System.Xml.Linq.zip" />
</assembly>
</manifest>
Finally, rebuild your application and then you will be able to find that all assemblies are built in serval .zip files under ClientBin folder.