Silverlight for the Enterprises – where are my dlls?

I recently spoke to a customer who wanted to know if Silverlight extracts the dlls (from the XAP) and stores them in the temp directories before building the type system in memory. The reason for the question was that they have a monitoring system that looks for patterns of unwanted files (e.g. *dll) and gets rid of them from directories except from the well known directories. When Silverlight downloads XAPs, it takes advantage of the browser cache in storing the packages. 

Once a package is located ( through download or from the cache), Silverlight runtime streams the IL code out of the XAP and constructs the assembly in memory. From there, construction of type system is straight forward.

So, as of beta1, Silverlight 2 will not leave any dlls persistently on the disk.



Comments (8)

  1. Jeff Handley says:

    With Silverlight using the browser cache, the DLLs could be left on disk within the temporary internet files folder, correct?

  2. hanuk says:

    You will only see .XAP file on the file system (browser cache). At run time the DLLs will be streamed into memmory and go away once you close the browser. As of beta1, they won’t leave any footprint on disk.  

  3. Eloff says:

    Unless you load the .dlls dynamically, i.e. separately from the .xap. Then I imagine that they will be in the cache.

  4. unknown says:

    How can I load .dlls dynamically.

  5. hanuk says:

    You can’t load a random .NET dll. If they DLL had been compiled to Silverlight runtime, it will have to be included into the XAP package. Once it is in the package, you can stream the dll into Silvelright applicaiton and use reflection to instantiate the types. See my other post on "Application Partitioning" for this technique.

  6. Actually, you can load just about any random DLL. Check out my post about it on my blog,

  7. My question is, does Silverlight run in a single AppDomain? If that were true then a dll could be reused across several applications, which could reduce some overhead.

Skip to main content