Groups | Blog | Home
all groups > dotnet internationalization > november 2005 >

dotnet internationalization : Question about ResXFileCodeGenerator in VS2005



Laurent Docquir
11/4/2005 12:00:00 AM
Hi all,

I want to centralize my localized strings in an external assembly but still
want to benefit from the new intellisense feature of VS2005.

So I create a new class library project names 'MyStrings' and add a new
resource file named 'Glossary.resx' to it. I add some strings and
automatically ResXFileCodeGenerator generates a csharp file named
'Glossary.Design.cs'. This file contains a class named 'Glossary' that
provides me with a property for each of the strings. So far so good: I now
have intellisense everywhere inside the class library project.

Next I create a new Win Forms Application and set a reference to
'MyStrings.dll'. Here comes the problem: I cannot access the 'Glossary'
class defined in MyString.dll. The reason is simple: ResXFileCodeGenerator
made this class internal !

My question : Do you know a way to make ResXFileCodeGenerator generate a
public class instead? Is it configurable?

I want to draw your attention to the fact that ResGen has a command line
parameter for this:
eg: ResGen.exe glossary.resx /str:c# /publicClass generates exactly the same
code as ResXFileCodeGenerator except that the class is public ;-)

Thanks in advance for any clues

Regards
Laurent Docquir

marinm NO[at]SPAM online.microsoft.com
11/15/2005 12:00:00 AM
Hi Laurent,
Currently it's not possible to configure the resource generation from
within the IDE. However another customer requested this at the MSDN
product feedback center. See MSDN Product Feedback Center link
:http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=
eaf58466-a6eb-4da9-bf2f-4949b5aff853
We do look at feature requests that many users have requested, so I
recommend voting on this one at the product feedback center, since the more
votes a given suggestion has, the more likely it is to be approved.
Thanks,
Marin Millar [MSFT]
AddThis Social Bookmark Button