Resource String showing Empty. Is the number of Strings in the Resources limited?

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

Hi All,

I'm using the Application's Resources to store Strings (right click on
the Application, Properties, Resources).
There are quite a lot of Strings in there. Today I've just added
another String the usual way, but when I come to display it (using the
generated property on My.Resources) the String is empty?
Any ideas why? The string has a value in the String table and the
property is generated correctly.
Would there be a limitation in the number of strings that can be
stored, and if so would there be a workaround.

Thanks
JB
 
Hi All,

I'm using the Application's Resources to store Strings (right click on
the Application, Properties, Resources).
There are quite a lot of Strings in there. Today I've just added
another String the usual way, but when I come to display it (using the
generated property on My.Resources) the String is empty?
Any ideas why? The string has a value in the String table and the
property is generated correctly.
Would there be a limitation in the number of strings that can be
stored, and if so would there be a workaround.

Thanks
JB

Hi All,

After a bit more investigation around my problem, I discovered that
even though I've added a new String to the resources, when I try to
display it with MsgBox(My.Resources.S_NEW_STRING), it's in fact an old
version of the Resources that are accessed where this S_NEW_STRING
didn't exist yet which explains why it doesn't show. To prove this
theory, I've changed the content of a String that already existed in
the resources and it still displays the old content...
I've tried pretty much all the options in the Build Menu (Clean,
Rebuild, Build) but nothing changes.
Does anybody know how to "refresh" my resources and force a re-
compilation.

Thanks
JB
 
Hi All,

After a bit more investigation around my problem, I discovered that
even though I've added a new String to the resources, when I try to
display it with MsgBox(My.Resources.S_NEW_STRING), it's in fact an old
version of the Resources that are accessed where this S_NEW_STRING
didn't exist yet which explains why it doesn't show. To prove this
theory, I've changed the content of a String that already existed in
the resources and it still displays the old content...
I've tried pretty much all the options in the Build Menu (Clean,
Rebuild, Build) but nothing changes.
Does anybody know how to "refresh" my resources and force a re-
compilation.

Thanks
JB

Hi All,

Well after much fiddling I've managed to sort out the problem.
Basically my resource file must have become somehow corrupted.
Here's how to fix it if you run into a similar issue:
- In Solution Explorer, show all files
- Double click on the Resources.Designer.vb (child of Resources.resx)
- A dialog box popping up that told me the End of Line characters were
inconsistent. By accepting the default option (replace by CRLF) it
sorted out my file.

JB
 
Back
Top