Skip to main content
Home Forums General Silverlight New Features in Silverlight 3 DLL file missing from .xap file
9 replies. Latest Post by pyt on June 30, 2009.
(0)
ken.smith
Member
70 points
45 Posts
06-11-2009 4:30 AM |
I have a solution with three separate Silverlight projects in it + a separate web project. Two of the Silverlight projects are "Application" projects (SlideLinc.Client and SlideLinc.Client.Whiteboard), and the third is a Silverlight library project that I'm trying to use to host some shared style resource (SlideLinc.Client.Resources).
My problem (among many) is that the Silverlight library project doesn't show up in the .xap file that sits in the web site's /ClientBin directory.
The output from the build shows the first two projects getting inserted into the .xap file, but not the third:
Begin Xap packagingPackaging SlideLinc.Client.dllPackaging SlideLinc.Client.Whiteboard.dllPackaging System.ComponentModel.DataAnnotations.dllPackaging System.ComponentModel.dllPackaging System.ServiceModel.PollingDuplex.dllPackaging System.Windows.Controls.dllPackaging System.Windows.Controls.Input.Toolkit.dllPackaging System.Windows.Controls.Layout.Toolkit.dllPackaging System.Windows.Controls.Navigation.dllPackaging System.Windows.Ria.dllPackaging System.Xml.Serialization.dllPackaging System.Windows.Controls.Toolkit.dllPackaging ServiceReferences.ClientConfigPackaging scripts\Camera.jsPackaging scripts\FlashHost.jsPackaging AppManifest.xamlXap packaging completed successfully
And when I open the .xap file (by renaming it to .zip), the SlideLinc.Client.Resource.dll isn't in there.
Before y'all ask, I'm referencing the resource DLL from both the "Application" projects. And the DLL is being built successfully:
------ Rebuild All started: Project: SlideLinc.Client.Resources, Configuration: Debug Any CPU ------C:\Windows\Microsoft.NET\Framework\v3.5\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;SILVERLIGHT /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\mscorlib.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\System.Core.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\system.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\System.Net.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\System.Windows.Browser.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\System.Windows.dll" /reference:"c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\System.Xml.dll" /debug+ /debug:full /optimize- /out:obj\Debug\SlideLinc.Client.Resources.dll /resource:obj\Debug\SlideLinc.Client.Resources.g.resources /target:library Dummy.cs Properties\AssemblyInfo.csCompile complete -- 0 errors, 0 warningsSlideLinc.Client.Resources -> C:\source\slidelinc\branches\28_SlideLincClient_ken\SlideLinc.Client.Resources\Bin\Debug\SlideLinc.Client.Resources.dll
I tried deleting the project and re-implementing it as a Silverlight Application (instead of a Silverlight Class Library), but no go.
Any other suggestions? Am I missing something?
ksleung
Contributor
5198 points
993 Posts
06-11-2009 4:48 AM |
Did you have the "Copy Local" property set to false?
06-11-2009 4:55 AM |
Good question. But it's set to "True", the default.
jamlew
2786 points
425 Posts
06-11-2009 12:04 PM |
Does the main Silverlight project have a reference to SlideLinc.Client.Resources, or is it only referenced by the SlideLinc.Client..*.dll libraries? If it doesn't reference it, can you try adding the reference? There is an msbuild bug where if you have a reference to assembly A, which in turn depends on assembly B, but no types from assembly B are referenced in code (code != XAML), we don't catch the dependency correctly.
06-11-2009 3:40 PM |
Thanks for the response. The main Silverlight app (SlideLinc.Client) does have a direct reference to the resource project. I also wondered about the possibility of an msbuild issue, so I added a dummy class to the resource project, referenced it in SlideLinc.Client, and called one of its methods. But it still didn't show up in the .XAP file -- and, of course, SlideLinc.Client threw an error when the method was called.
pyt
33 points
16 Posts
06-30-2009 12:45 PM |
I'm having the same exact issue. Did you find a solution?
06-30-2009 1:05 PM |
Nope, never did. I got tired of trying to fix it, so I got rid of the Resources project, and copied the appropriate files to both projects. If anyone does have a solution, I'd love to hear it.
06-30-2009 1:15 PM |
I think I might actually have found the issue. It seems to be related to having Resource in the name of the project.
I tried with a different name and it worked.
Now I have another issue, there are multiple dlls generated when you compile the project (one per culture) but the only one ending up in the xap is the default culture...
06-30-2009 1:33 PM |
Cool! That's worth a bug report.
06-30-2009 1:46 PM |
Figured out my problem, I needed to add the supported cultures in my csproj, everything works fine now.
<SupportedCultures>en;fr</SupportedCultures>