views:

49

answers:

2

Weird problem, started with migration to Visual Studio 2010.

Some forms, when opened, will have some objects' properties set to a string that is empty in resource file. Most often these are control properties like ImageKey, ToolTipText and for UltraGrid some columns get columnX.Header.Caption set to that string. This will obviously remove set images and give wrong column header texts in other locales. Additionally tooltips will show up in weird places (like tab panel body).

This string (strSaveInterestDetails8 below) is empty in Strings.resx (<value />), but not empty in Strings.fi.resx. When I changed this string to have a space, designer started to use an other "empty" string from Strings.resx..

These forms are all derived from common base, but it does not have anything special/suspicious. Debugging these from additional devenv instance failed, since the debugger never broke on the set breakpoints (thrown exceptions in internal VS code were caught).

example:

ultraGridColumn23.Header.Caption = global::Company.Module.Properties.Strings.strSaveInterestDetails8;
...
this._timespanCheck.ImageKey = global::Company.Module.Properties.Strings.strSaveInterestDetails8;
...
this.tabPage1.ImageKey = global::Company.Module.Properties.Strings.strSaveInterestDetails8;
this.tabPage1.ToolTipText = global::Company.Module.Properties.Strings.strSaveInterestDetails8;

So has anyone run into something similar or has better google-fu?

A: 

I think this will work for you. Check the accepted solution.

Or maybe this.

Nayan
This is not relevant in this case. Application has several hundreds of forms. Full scale migration to another type of localization is highly unlikely.
Pasi Savolainen
A: 

Hello, Pasi!

Did you find the solution of this problem? I have exactly the same trouble.

keykeeper
No solution yet. We've removed those by hand (macro that searches for the string and removes whole line..). Also some dialogs seem to work after I remove these funny values via designer, I've not looked at what difference that makes in diff.
Pasi Savolainen