Gabriel Lozano-Moran

Hello

I have a simple Windows Forms application and a class library with two resx files:

- ProjectX (WinForms app)

- Resources (Class Library)

--- strings.nl-BE.resx

--- strings.fr-BE.resx

I have added a string value named "test" to the resx files.

When I compile the ProjectX.Resources projects this is the AL.EXE command executed:

...\AL.exe /culture:fr-BE /outSurprisebj\Debug\fr-BE\Resources.resources.dll /templateSurprisebj\Debug\Resources.dll /embedSurprisebj\Debug\Resources.strings.fr-BE.resources
...\AL.exe /culture:nl-BE /outSurprisebj\Debug\nl-BE\Resources.resources.dll /templateSurprisebj\Debug\Resources.dll /embedSurprisebj\Debug\Resources.strings.nl-BE.resources

I have then copied the output to the ProjectX (WinForms app) folder and the folder now looks like this:

- ProjectX.exe

- nl-BE

--- Resources.resources.dll

- fr-BE

--- Resources.resources.dll

In my ProjectX WinForms app I initialize a Resource Manager and retrieve the "test" string as follows:

ResourceManager rm = new ResourceManager("Resources.strings", Assembly.GetExecutingAssembly());

MessageBox.Show(rm.GetString("test", new CultureInfo("nl-BE")));

When I run ProjectX.exe I get the following exception:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Resources.strings.resources" was correctly embedded or linked into assembly "ProjectX" at compile time, or that all the satellite assemblies required are loadable and fully signed.

I thought that the process of working with satellite assemblies would be pretty straightforward but apparently not. What exactly am I doing wrong here





Re: Visual C# General Help needed with satellite assemblies


Re: Visual C# General Help needed with satellite assemblies

Gabriel Lozano-Moran

Vidhura wrote:
http://support.microsoft.com/default.aspx scid=kb;EN-US;839861

As far as I know it should be possible in .NET 2.0 to manually create satellite assemblies without explicitly using resgen en AL.exe






Re: Visual C# General Help needed with satellite assemblies

Gabriel Lozano-Moran

I have tried to find a decent article that shows me how to create satellite assemblies without the need of using tools resgen.exe and AL.exe. What I want is to completely work with the Visual Studio IDE by creating resx files and then compiling them correctly and automatically to resource files.






Re: Visual C# General Help needed with satellite assemblies

Karthikeya Pavan Kumar .B

Check this Walkthrough: Localizing Windows Forms






Re: Visual C# General Help needed with satellite assemblies


Re: Visual C# General Help needed with satellite assemblies

uncle hammy

Double check the namespace in your Resources/strings files, because you'll need to use it.

i.e. if your Resource class is My.Project.Resources

then you'll need to use...

ResourceManager rm = new ResourceManager("My.Project.Resources.strings", Assembly.GetExecutingAssembly());


I just finsihed battling this exact same topic in Friday. It turned out to be this solution that was causing me this error in all my tests.






Re: Visual C# General Help needed with satellite assemblies

Gabriel Lozano-Moran

uncle hammy wrote:
Double check the namespace in your Resources/strings files, because you'll need to use it.

i.e. if your Resource class is My.Project.Resources

then you'll need to use...

ResourceManager rm = new ResourceManager("My.Project.Resources.strings", Assembly.GetExecutingAssembly());


I just finsihed battling this exact same topic in Friday. It turned out to be this solution that was causing me this error in all my tests.

Holy macaroni!