I have several Silverlight utility and control projects that I re-use in several different applications with-in my web application. These are all worked on in the same solution. Each Silverlight application has it's own page.
Example Setup
- Utilities
CommonResources I've strong name keyed and created extmap for these projects, but the dll's are still in the xaps. 开发者_JAVA百科The version is defnied as 1.0.0.0 in the assembly.cs.
CommonResources 1.0.0.0 {public key here} Silverlight.Common.CommonResources.dll
These all reference Utilities and CommonResources - ManageFoo - ManageBar - etc
Can I assembly cache the utilities and CommonResources dll?
You may try adding an XML file (e.g. named Common.CommonResources.extmap.xml) to the CommonResources project, and set “Copy to Output Directory” to “Copy if newer”, with the following content:
<?xml version="1.0"?>
<manifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<assembly>
<name>Common.CommonResources</name>
<version>*.*.*.*</version>
<publickeytoken>*</publickeytoken>
<relpath>Common.CommonResources.dll</relpath>
<extension downloadUri="Common.CommonResources.zip" />
</assembly>
</manifest>
I don't see why you couldn't in this scenario. In fact it seems to be the ideal candidate.
You'll need to make sure you generate extmap
files for your Utilities and CommonResources dlls. The file looks like this:
<?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.Windows.Controls.Data.DataForm.Toolkit</name>
<version>2.0.5.0</version>
<publickeytoken>31bf3856ad364e35</publickeytoken>
<relpath>System.Windows.Controls.Data.DataForm.Toolkit.dll</relpath>
<extension downloadUri="System.Windows.Controls.Data.DataForm.Toolkit.zip" />
</assembly>
</manifest>
and has the name of the form:
<dllname>.extmap.dll
and must be in the same location as the dll itself.
精彩评论