Problem using Windows Resource Localization Editor (WinRes.exe)

B

Bill

Hi Everyone,

I am having some difficulty in using the Windows Resource Localization
Editor (WinRes.exe) on several Visual Basic .NET forms (.resx files) in two
different projects. The editor gives an error when loading the .resx files.

When attempting to load a .resx file using WinRes under Visual Studio .NET
2003, the following error is displayed in the client area of the editor:

"An error occurred while loading the document. Fix the error, and then try
loading the document again. The error message follows: Object reference
not set to an instance of an object."

When attempting to load the same .resx file using WinRes under Visual Studio
2005, the following errors are displayed in the status area of the tool:

"Warning: Failed to load the type for component 'dsCustomer'.
Warning: Failed to load the type for component 'Titles1'.
Error - The data name 'dsCustomer' is invalid. Valid data names must be of
the form 'Component.Property'.
Error - The data name 'dsCustomer' is invalid. Valid data names must be of
the form 'Component.Property'.
Error - The data name 'Titles1' is invalid. Valid data names must be of the
form 'Component.Property'.
Error - The data name 'Titles1' is invalid. Valid data names must be of the
form 'Component.Property'."

The 'dsCustomer' and 'Titles1' are data sets (DataSet objects). It seems
that all forms that have data sets have this issue with the localization
editor.

Does anyone have an idea how to solve or work around this problem? I need a
solution using Visual Studio 2003, not VS 2005.

Thank You.
 
K

Kevin Yu [MSFT]

Hi Bill,

What verison of VS.NET are these .resx files build from? As a general rule,
you should use the version of Winres.exe that was released with the .NET
Framework you are using to create the application. Here is a link for your
reference.

http://msdn2.microsoft.com/en-us/library/8bxdx003.aspx

If you still cannot open that file, could you attach an resx file that can
reproduce the error?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

Hi Bill,

From the error message, it seems that the 'dsCustomer' reference is not
pointing to any valid object. As opening the resx file requires to open the
form file together, please do check if there is any error in the form file.
Try to rebuild the windows form project to see if there is any compile
error.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

Hi Bill,

Thank you very much for your repro code. With this code, I did more
research and found it is a known issue in VS.NET. the DataSets are not
serialized correctly in localized Forms. In this case, I suggest you try to
contact Microsoft PSS for a workaround. Please check the following link for
the contact information:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;OfferProPhone

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
B

Bill J

Kevin,

Thanks for your feedback. Since Microsoft knows about this issue, I assume
they don't have to be reminded of it. I'm curious though that I could not
find anything in Knowledge Base about it.

I did some digging and found that 3rd party translation tools don't have the
same issue and actually present a cleaner mechanism for translation by not
exposing all of the resource properties. The other workaround is to
programmatically create the required DataSets and links to the forms --
assuming that there is no other issue with WinRes.

Bill


Hi Bill,

Thank you very much for your repro code. With this code, I did more
research and found it is a known issue in VS.NET. the DataSets are not
serialized correctly in localized Forms. In this case, I suggest you try to
contact Microsoft PSS for a workaround. Please check the following link for
the contact information:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;OfferProPhone

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
K

Kevin Yu [MSFT]

Hi Bill,

Nice to hear that you have got a workaround. I'm sorry for the
inconvenience.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

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