Search code examples
visual-studio-2013satellite-assembly

Why is VS2013 not generating satellite assemblies?


While the rest of my team is using VS2012, I'm the first member of my team to switch over to VS2013. One of the first major differences I've noticed is that for the same project/solution, VS2012 is generating satellite assemblies for my RESX localization files but VS2013 is not. All resources are being embedded within the main assembly.

How can I get VS2013 to generate satellite assemblies automatically?

Update: Here is an interesting part of the build log:

It appears that the culture is not being detected correctly. In the VS2012 build log, it was.

2>Target "SplitResourcesByCulture" in file "C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets" from project "..." (target "PrepareResourceNames" depends on it):
2>Task "Warning" skipped, due to false condition; ('@(ResxWithNoCulture)'!='') was evaluated as (''!='').
2>Task "Warning" skipped, due to false condition; ('@(ResxWithCulture)'!='') was evaluated as (''!='').
2>Task "Warning" skipped, due to false condition; ('@(NonResxWithCulture)'!='') was evaluated as (''!='').
2>Task "Warning" skipped, due to false condition; ('@(NonResxWithNoCulture)'!='') was evaluated as (''!='').
2>Task "AssignCulture"
2>  Culture of "" was assigned to file "Documentation\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Documentation\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Modules\Analysis\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Analysis\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Infrastructure\Resources\Features.fr.resx".
2>  Culture of "" was assigned to file "Infrastructure\Resources\Features.resx".
2>  Culture of "" was assigned to file "Modules\Reporting\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Reporting\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Controls\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Controls\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Infrastructure\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Infrastructure\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Infrastructure\Resources\StructureItemAttributes.fr.resx".
2>  Culture of "" was assigned to file "Infrastructure\Resources\StructureItemAttributes.resx".
2>  Culture of "" was assigned to file "Modules\Data\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Data\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Modules\Home\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Home\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Modules\License\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\License\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Modules\Menu\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Menu\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Modules\Options\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Options\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Modules\Structure\Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Modules\Structure\Resources\Messages.resx".
2>  Culture of "" was assigned to file "Resources\Messages.fr.resx".
2>  Culture of "" was assigned to file "Resources\Messages.resx".
2>Done executing task "AssignCulture".

Solution

  • This problem was due to CultureInfo.GetCultures returning an empty collection. The fix was the following (answer for this separate question I also opened):

    Check to see if the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\ExtendedLocale is present. If it is missing, there is a known issue that can be worked around by adding this key.

    Simply adding the 'ExtendedLocale' registry key did the trick.