Xap file content changes if embedded in Visual Studio or build server

I am using MEF with my Silverlight 4 application to load xap files dynamically. To streamline this process, I removed various assemblies from my xaps since I know they were already loaded by the base xap. This reduces the size of my dynamically loaded xaps. I accomplished this by setting the Copy Local flag for each assembly reference to false.

This all works great when I build Visual Studio 2010 - my xaps are much smaller. However, when the same projects are built by the build server, all excluded references reappear in the xap file, which triples the xap size.

I have read several blogs / articles about similar events, but without permission. Very frustrating - any help is appreciated.

+2


a source to share


1 answer


Xap files are just Zip files with a different extension. So if you can't figure out why the build server contains assemblies you don't need, you can create a post-build step that treats Xap as Zip and removes those assemblies from it.



+1


a source







All Articles