[Mono-list] ResourceManager class questions

Carlos Guzman Alvarez carlosga@telefonica.net
Thu, 02 Oct 2003 22:35:04 +0200


> So, if you are getting errors like MethodNotFound exception when trying 
> to use resources, the patch may be helpful.

I have applied your patch and tested it but i'm getting an error :).

Ok, an explain of the problem, i'm creating a new instance of the 
resourcemanager class as:

MESSAGES = "FirebirdSql.Data.Firebird.Resources.Gds.isc_error_msg";

rm = new ResourceManager(MESSAGES,		 

This is is working ( or at least is not throwing an exception :) ).

The resource file is generated with ms resgen from a text file with 
contents like this:

335544321=arithmetic exception, numeric overflow, or string truncation
335544322=invalid database key
335544323=file {0} is not a valid database
335544324=invalid database handle (no active connection)
335544325=bad parameters on attach or create database
335544326=unrecognized database parameter block
335544327=invalid request handle
335544328=invalid BLOB handle

The exception gives when i try to get the value of an element of the 
resource, i'm making this as:

message = rm.GetString(code.ToString());

I have tested this too:

message = rm.GetString(code.ToString(), CultureInfo.InvariantCulture);

In both cases i get this exception ( Red hat linux 8 - Mono 0.28 )

Could not find any resource appropiate for the specified culture or its 

in <0x0032a> System.Resources.ResourceManager:InternalGetResourceSet 
in <0x00097> System.Resources.ResourceManager:GetString 
in <0x00019> System.Resources.ResourceManager:GetString (string)
in <0x0005a> FirebirdSql.Data.Firebird.Gds.GdsExceptionHelper:GetMessage 


This is working ok with ms .net.

For ms.net i'm making the build using nant, the resource file is build as:


For mono on linux i have a makefile, the resource file is build as:


What i'm making bad or how can make for solve this ??

Thanks in advance.

Best regards

Carlos Guzmán Álvarez

"Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las 
mismas cosas."

Albert Einstein.