How to access satellite assemblies created using resgen.exe and al.exe?

  • Thread starter Thread starter Ben Jones
  • Start date Start date
B

Ben Jones

Hi there,

I am looking into the ease of implementing the localization/globalization
features of .NET using C#. I have a test app which creates a ResourceManager
and attempts to load a resource for a specified culture.

I created the WinForm application in Visual Studio and added a default
*fallback* resource to the main assembly.

When I create a simple resource file for the en-NZ culture as a text file,
convert it to a resource file using resgen.exe and then create a satellite
assembly using al.exe, my resource manager fails to pick up this new culture
specific resource even though I create the resource manager passing in the
en-NZ culture.

If I add a culture specific resource file to the main assembly the resource
manager picks it up no problem.

I have read alot of online help about this and I can't see where I am going
wrong.

Here are the test application details:

Main Assembly: TestLocalisation.exe (contains a single form with a label
whose text property is to be set from a value extracted from the resource
file)

Default Resource: TestStrings.resx (created in Visual Studio .NET and
built into the main assembly)

en-NZ Resource: TestStrings.en-NZ.resource (created from
TestStrings.en-NZ.txt using resgen.exe and stored in \bin\Debug\en-NZ)

Satellite Assembly: TestLocalisation.resource.dll (created using al.exe
/out:TestLocalisation.resources.dll /c:en-NZ
/embed:TestStrings.en-NZ.resources and also stored in \bin\Debug\en-NZ)

No matter what I try the resource manager fails to find the en-NZ resource
and falls back to the default resource built into the main assembly.

Does anyone have any ideas what I might be doing wrong ?

Thanks in advance,
Ben
 
Back
Top