Home Dashboard Directory Help
Search

Embedded Resource with name ending in "No.xxx" will not be included by Pierre Arnaud


Status: 

Closed
 as By Design Help for as By Design


1
0
Sign in
to vote
Type: Bug
ID: 586804
Opened: 8/16/2010 9:41:52 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

A file named "Test.No.txt" with the Build Action set to Embedded Resource will not be embedded as a resource, whereas the same file, renamed to "Test.Yes.txt" will be properly embedded.
Details
Sign in to post a comment.
Posted by Pierre Arnaud on 8/31/2010 at 8:23 PM
Thank you for your explanation. This is rather obvious, once you remember how Visual Studio handles localized resources, and completely logical. I was too focused on the meaning of the word 'No' to think of it as a two-letter language specifier.
Posted by Microsoft on 8/31/2010 at 8:33 AM
Hello, thanks for the report, this is actually working normally. The reason is that any resx files whose names match the pattern <something>.VALIDCULTURE.resx are assumed to be specific to that culture. (This is how it has worked since VS2002, for better or worse)
In your case "no" is a valid culture (Norwegian, I guess) so the build process builds it into a satellite assembly. Here's what I got when I tried this. Note the "no" subfolder. If in your app you change your current culture to Norwegian, the resource load will load this set of resources.

ConsoleApplication4\ConsoleApplication4\bin\Debug\no\ConsoleApplication4.resources.dll

Dan
Posted by Microsoft on 8/18/2010 at 2:01 AM
Thanks for your feedback. We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Pierre Arnaud on 8/16/2010 at 9:45 PM
Posted this question to StackOverflow (http://stackoverflow.com/questions/3456014/embedded-resource-missing-in-visual-studio-2010-when-name-ends-with-no-xxx) with no result as of 17 August 2010.
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
ConsoleApplication1.zip 8/16/2010 10 KB