Click here to Skip to main content
13,051,413 members (56,727 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 30 May 2012

Globalization, Localization And Why My Application Stopped Launching

, 30 May 2012
Rate this:
Please Sign up or sign in to vote.
Globalization, localization and why my application stopped launching

When I was localizing a Windows Phone application I was developing, I set the argument on the constructor of the AssemblyCultureAttribute for the neutral culture (en-US in this particular case) for my application.StatCounter

As it was late at night (or early in the dawn Smile) I went to sleep and, on the next day, the application wasn’t launching although it compiled just fine.

I’ll have to confess that it took me a couple of nights to figure out what I had done to my application.

Have you figured out what I did wrong?

The documentation for the AssemblyCultureAttribute states that:

The attribute is used by compilers to distinguish between a main assembly and a satellite assembly. A main assembly contains code and the neutral culture's resources. A satellite assembly contains only resources for a particular culture, as in [assembly:AssemblyCultureAttribute("de")]. Putting this attribute on an assembly and using something other than the empty string ("") for the culture name will make this assembly look like a satellite assembly, rather than a main assembly that contains executable code. Labeling a traditional code library with this attribute will break it, because no other code will be able to find the library's entry points at runtime.

So, what I did was mark the once main assembly as a satellite assembly for the en-US culture which made it impossible to find its entry point.

To set the neutral culture for the assembly resources, I should have used (and eventually did) the NeutralResourcesLanguageAttribute. According to its documentation:

The NeutralResourcesLanguageAttribute attribute informs the ResourceManager of the application's default culture, and also informs the ResourceManager that the default culture's resources are found in the main application assembly. When looking up resources in the same culture as the default culture, the ResourceManager automatically uses the resources located in the main assembly instead of searching for a satellite assembly. This improves lookup performance for the first resource you load, and can reduce your working set.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Paulo Morgado
Software Developer (Senior) Paulo Morgado
Portugal Portugal

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 30 May 2012
Article Copyright 2012 by Paulo Morgado
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid