Any .dll that contains the word Resources is not added to the .xap!
Even in Silverlight 4 beta, this problem still exists, whether or not you add the <SupportedCultures>en-US</SupportedCultures> tag to the project file.
I have my resources in a separate project, that outputs a .dll named Something.Base.Resources.dll. I include this .dll in my main project. After building, the .xap contains all my referenced .dlls,
except for Something.Base.Resources.dll.
I changed the resources .dll name from Something.Base.Resources.dll to Something.Base.ResXources.dll. Now, the dll is added to the xap... This sounds very strange to me. Can someone from Microsoft please comment?
Just following up - this was determined to be by design. File names ending in Resources.dll are reserved as resource assemblies, and can't be used for references.
If this post has solved your problem, please select 'Mark as answer'
- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team
We have learned that CopyLocal = true is misleading. CopyLocal is set to true by default, but that does not always cause the DLL to get included in the .xap. However, if you change it to false, then back to true, it does get included in the .xap. We have
experienced this many times in VS2008 with Silverlight 3. Just hoping to make others aware of the query.
Also, after you do this, you will notice that it does cause a change in the .csproj file. It sets the Private Tag explicitly to true, rather than relying on the msbuild default value of true.
Just following up - this was determined to be by design. File names ending in Resources.dll are reserved as resource assemblies, and can't be used for references.
Jimmy,
Obviously, I'm missing something here. I don't get it. If we can't reference a *.Resources.dll, what use are they?
This one got me for a few hours too. Couldn't figure out why my assembly wasn't being included in my .xap file (Library.Resources). Renaming it to Library.Common solved the problem
Hi! I Seem have same problem. my dll file (non linear navigation service Dll file) could add into my project. and i work good when i debug that project. But When i exit app and open app again (in Windows phone emulator) without debug. It did not worked.
The Lockster
Member
3 Points
6 Posts
Re: Re: DLL file missing from .xap file
Nov 18, 2009 09:55 AM | LINK
This took me ages to resolve, just had the same issue with an assembly named <customnamespace>.Resources.dll
Thank you so much for finding this, i was starting to go loopy.
Paul
rcbapb
Member
2 Points
2 Posts
Re: Re: DLL file missing from .xap file
Nov 29, 2009 11:33 AM | LINK
Any .dll that contains the word Resources is not added to the .xap!
Even in Silverlight 4 beta, this problem still exists, whether or not you add the <SupportedCultures>en-US</SupportedCultures> tag to the project file.
I have my resources in a separate project, that outputs a .dll named Something.Base.Resources.dll. I include this .dll in my main project. After building, the .xap contains all my referenced .dlls, except for Something.Base.Resources.dll.
I changed the resources .dll name from Something.Base.Resources.dll to Something.Base.ResXources.dll. Now, the dll is added to the xap... This sounds very strange to me. Can someone from Microsoft please comment?
Thanks,
Peter
jamlew
Contributor
3822 Points
549 Posts
Microsoft
Re: Re: DLL file missing from .xap file
Dec 14, 2009 06:51 PM | LINK
Sorry to re-join the thread so late. I've filed a bug for this issue, but I don't know if it will make the bar or not at this point.
As a workaround, you can avoid file names that end in .Resources.dll - anything else should work, such as .SharedResources.dll.
- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team
jamlew
Contributor
3822 Points
549 Posts
Microsoft
Re: Re: DLL file missing from .xap file
Jan 11, 2010 05:27 PM | LINK
Just following up - this was determined to be by design. File names ending in Resources.dll are reserved as resource assemblies, and can't be used for references.
- Jimmy Lewis
Microsoft SDET
Visual Web Developer Team
RobKraft
Member
19 Points
13 Posts
Re: Re: DLL file missing from .xap file
Feb 02, 2010 09:28 PM | LINK
We have learned that CopyLocal = true is misleading. CopyLocal is set to true by default, but that does not always cause the DLL to get included in the .xap. However, if you change it to false, then back to true, it does get included in the .xap. We have experienced this many times in VS2008 with Silverlight 3. Just hoping to make others aware of the query.
Also, after you do this, you will notice that it does cause a change in the .csproj file. It sets the Private Tag explicitly to true, rather than relying on the msbuild default value of true.
jasonxz
Participant
1787 Points
557 Posts
Re: Re: DLL file missing from .xap file
Oct 12, 2010 06:16 PM | LINK
Jimmy,
Obviously, I'm missing something here. I don't get it. If we can't reference a *.Resources.dll, what use are they?
Viewstate
Member
16 Points
8 Posts
Re: Re: DLL file missing from .xap file
Oct 25, 2010 07:21 AM | LINK
This one got me for a few hours too. Couldn't figure out why my assembly wasn't being included in my .xap file (Library.Resources). Renaming it to Library.Common solved the problem
thanhpn7188
Member
2 Points
1 Post
Re: DLL file missing from .xap file
Apr 21, 2012 01:02 AM | LINK
Hi! I Seem have same problem. my dll file (non linear navigation service Dll file) could add into my project. and i work good when i debug that project. But When i exit app and open app again (in Windows phone emulator) without debug. It did not worked.
Here is my Project :
http://www.mediafire.com/download.php?aix2v3w2ox4wyrd