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

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 586804 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 8/16/2010 9:41:52 PM
Access Restriction Public

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.
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.