Cannot create System.Resources.ResourceManager object

R

Rich M

My problem is ResourceManager constructor is throwing an exception when used
on a WM5 device that has custom localization software installed. My
customers have reported this problem when using software from
Mobem(CE-Star), Elron, Maction Technologies(Monster Chinese) and
DioTek(DioPen v6). I have created a test program that duplicates this
problem using Visual Studio 2003 and NETCF v1 SP3 tools (I have since moved
up to VS2005 and this problem is still being reported). The specific problem
is the System.Resources.ResourceManager constructor is throwing an
exception. The type of exception is "Exception" and the message is
"Exception". Without this custom localization software installed, the
constructor runs without throwing an exception.

The source code to reproduce the problem is below. I created a new "Visual
C# Project" of type "Smart Device Application" and named it MobemTest and
add the following code into the main form's constructor.

try{
System.Resources.ResourceManager resMan;
System.Reflection.Assembly assembly =
System.Reflection.Assembly.GetExecutingAssembly();
if (assembly != null){
resMan = new System.Resources.ResourceManager("MobemTest.Resource1",
assembly);
}
}
catch (Exception ex){
MessageBox.Show("Exception Type: " + ex.GetType().ToString());
MessageBox.Show("Message: " + ex.Message);
}

Add an "Assembly Resource File" to the project called Resource1.resx using
the "Add/Add New Item/Assembly Resource File" menu. Run the program and if
one of these custom localization applications is installed, the
System.Resources.ResourceManager constructor will throw an exception.

Am I doing something wrong with the way I am building my resources and
creating the resource manager? Is this a problem with the various packages
from these vendors? Thanks for any help you can provide.

Rich M
 
R

Rich M

As a followup to my original message...

After additional testing using Visual Studio 2005, I am still getting
exceptions. Using VS2005 with my NETCF v1 SP3 test application as described
in my original message, I still saw the exception during the ResourceManager
constructor. If I then updated my application to use NETCF v2 (and testing
with DioPen software and Korean regional settings), the constructor
succeeded but then a call to the ResourceManager GetString method throwing a
System.PlatformNotSupportedException. I tried passing different CurrentInfo
values to the GetString call such as CurrentCulture, "en", "en-US" and "ko".
Any ideas what else to try?

Rich M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top