[IronPython] Silverlight+IronPython: external DLLs

Jimmy Schementi Jimmy.Schementi at microsoft.com
Tue Jun 17 04:13:43 CEST 2008


Jonathan,

Make your AppManifest.xaml file look like this, this will let you download DLLs from the root of the current domain. You can also add http://foo.com to the beginning of the path and have it download from a different server (which needs to have a clientaccess.xml or clientaccesspolicy.xml file). Take a look at this post; at the “My XAP is filled with CRAP!” heading I start talking about how to pull DLLs out of the XAP.

<Deployment
   xmlns="http://schemas.microsoft.com/client/2007/deployment"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   RuntimeVersion="%(version)s"
   EntryPointAssembly="Microsoft.Scripting.Silverlight"
   EntryPointType="Microsoft.Scripting.Silverlight.DynamicApplication">
   <Deployment.Parts>
      <AssemblyPart Source="/%(path_to_dlr_assemblies)/Microsoft.Scripting.dll" />
      <AssemblyPart Source="/%(path_to_dlr_assemblies)/IronPython.dll" />
      <AssemblyPart Source="/%(path_to_dlr_assemblies)/IronPython.Modules.dll" />
      <AssemblyPart Source="/%(path_to_dlr_assemblies)/Microsoft.Scripting.Core.dll" />
      <AssemblyPart Name="Microsoft.Scripting.Silverlight" Source="/%(path_to_dlr_assemblies)/Microsoft.Scripting.Silverlight.dll" />
   </Deployment.Parts>
</Deployment>

Make sense?
~js

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jonathan Slenders
Sent: Monday, June 16, 2008 10:03 AM
To: Discussion of IronPython
Subject: [IronPython] Silverlight+IronPython: external DLLs

Hello, I'm working on dynamic generation of XAP files from XAML and Python code.
The normal way is to pack them all in a single XAP file. The problem here is that this files easily become a few MB and this is not reasonably when you've -- say 10 -- of these silverlight controls on a webpage.
My current Manifest file looks like this:

<Deployment
                xmlns="http://schemas.microsoft.com/client/2007/deployment"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                RuntimeVersion="%(version)s"
                EntryPointAssembly="Microsoft.Scripting.Silverlight"
                EntryPointType="Microsoft.Scripting.Silverlight.DynamicApplication">
        <Deployment.Parts>
                <AssemblyPart Source="Microsoft.Scripting.dll" />
                <AssemblyPart Source="IronPython.dll" />
                <AssemblyPart Source="IronPython.Modules.dll" />
                <AssemblyPart Source="Microsoft.Scripting.Core.dll" />
                <AssemblyPart Name="Microsoft.Scripting.Silverlight" Source="Microsoft.Scripting.Silverlight.dll" />
        </Deployment.Parts>
</Deployment>

And when I don't include the dll files in the XAP container, Silverlight tries to download them from the server, it's URL path relative to the current page.

Is it possible to set an absolute path where the Silverlight client can download the DLL files?
And from the IronPython perspective, does it any harm to keep these DLLs out of the XAP?

Thanks,
Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080616/8edef0b1/attachment.html>


More information about the Ironpython-users mailing list