In our project in Visual Studio 2008 there are several files generated by the auto-generator, with some localized versions, and in one of these localized versions there is a line that is empty in this case.
More explicit. We have a core resource file with lots of string resources. Then we have 4 more localized versions of this file, and in one of these other localized files one of the lines is assigned an empty value.
Now the problem is that the form designer is quite happy that he has found a resource for the line and, apparently, will not stop at all, to reuse this resource for any empty lines, he will assign a property in the generated constructor code for the form.
For example, if for some reason the property in the control is not specified with a default value (therefore, it will be serialized for the code, even if it is empty), then it will refer to our resource instead of writing an empty string literally in C code #.
The problem is that it refers to localized versions, and they are not compiled for the code.
Here is an example of abbreviated code:
this.rpAllFields.KeyTip = global::namespaces.SystemMessagesResources_sv_SE. dash_red_shift_info_description;
In this case, dash_red_shift_info_description does not matter for the sv-SE locale, so the developer, when he sees an empty line in the code, will try to bind this resource. But SystemMessagesResources_sv_SE is not an existing class, but apparently the generated class name for the Swedish localized version of the SystemMessagesResources resource file that is compiled into the class.
Can this be avoided? We are tired of searching / replacing every time we change something in the form files, and we are pretty sure that we did this to make it happen, but we apparently are not able to find the reason for this ourselves.
The above code, if we deleted the resource, read like this:
this.rpAllFields.KeyTip = "";