Questions tagged [resgen]

The Resource File Generator converts .txt files and .resx (XML-based resource format) files to common language runtime binary .resources files that can be embedded in a runtime binary executable or compiled into satellite assemblies.

ResGen.Exe

ResGen (Resource File Generator) is a .NET Framework Tools. It is installed with Visual Studio. It can normally be found in "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\ResGen.exe".

Resgen is used in the command prompt. It is also possible to use it in code with : Process.Start() (C#)

Resgen.exe can performs the following conversions:

Converts .txt files to .resources or .resx files.

Converts .resources files to text or .resx files.

Converts .resx files to text or .resources files.

A .resx file created by the ResXResourceWriter class cannot be used directly by a .NET Framework application. Before adding this file to your application, run it through Resgen.exe to convert it to a .resources file. In order for Resgen.exe to be able to parse your input, it is critical that your .txt and .resx files follow the correct format.

Useful links

32 questions
14
votes
1 answer

Programmatically generate Designer.cs for resx file (ResXResourceWriter/ResXResourceReader)

I'm creating/updating resx files in TFS using ResXResourceWriter/ResXResourceReader which doesnt generate the .Designer.cs file. I saw that Resgen creates the .Designer.cs. How can i call that programmatically to generate the .Designer.cs at a…
jspence
  • 409
  • 4
  • 13
12
votes
3 answers

Where do I get resgen.exe to use with NANT?

I am simply trying to run NANT with resgen, but I can't seem to find what I need to download to have it available in 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\resgen.exe' on my server. Thank you.
naspinski
  • 34,020
  • 36
  • 111
  • 167
6
votes
1 answer

Compile resx files in the project or just use resgen without compiling resx

I am using 2 resx files in my project one for en-Us and other for de-DE (localization). I compile these resx files to resource files using resgen. Can anyone please help me on the following two questions: If I need to add more resx files in the…
Gags
  • 827
  • 2
  • 13
  • 29
5
votes
4 answers

error RG0000: Could not load file or assembly 'xxx' or one of its dependencies. Access is denied

This is for a windows forms project under VS2010. Here is the message I get from MSBuild: error RG0000: Could not load file or assembly '3rdPartyAssemblyUsedByProject, Version=1.1.263.0, Culture=neutral, PublicKeyToken=687bce93d7ce902c' or …
Cort
  • 237
  • 2
  • 11
5
votes
3 answers

Combine LocBaml and Resources in single satellite assembly

Its my understanding that the recommended approach to localization in WPF is to use the LocBaml tool to extract the localizable items into e.g. a csv file, translate the items into the desired language and regenerate a new sattelite assembly from…
soren.enemaerke
  • 4,770
  • 5
  • 53
  • 80
5
votes
2 answers

How to use .resx and .resource files in custom server control asp?

I am writing my own server side control and I am using images that are being stored in a .resx file. In the console application this code works fine: ResXResourceReader rsxr = new ResXResourceReader("Resource1.resx"); foreach…
Dot Net
  • 137
  • 2
  • 6
3
votes
1 answer

Converting resources file to resx - not serializable

I have a task where I'm reconstructing some source we lost for many projects. For the most, it's gone just fine, but of course on the very last project, I ran into an error that I cannot find any solution to. I used Reflector 8.1 to decompile the…
Tyler Wilson
  • 586
  • 5
  • 11
3
votes
1 answer

How to make Constructor StringResources to public in StronglyTypedClass file generated using resgen.exe with C# and .NET 4.5

I have been generating a StronglyTypedClass file using resgen.exe in my Windows Form application using C# and .NET 4.5 According to syntax I can make the StringResources class as public but the Constructor still remains internal. resgen…
Indigo
  • 2,887
  • 11
  • 52
  • 83
2
votes
0 answers

Run CustomTool PublicResXFileCodeGenerator outside Visual Studio

I have a resx file that only contains strings. When I edit this file in VS2022, the Resources.Designer.cs file is updated to match the resx file contents. I have a tool that updates the resx (xml file) and I would like the designer file to match. …
Neil
  • 11,059
  • 3
  • 31
  • 56
2
votes
1 answer

MonoTouch build failed due to resgen error

I get the following error when MonoTouch runs resgen on a .resx file in the solution: strings.resx: Error: Native stacktrace: * Assertion at ../../../../mono/metadata/object.c:1778, condition `class' not met 0 mono …
cmour
  • 598
  • 6
  • 13
2
votes
1 answer

Problem compiling resource file to library

I have a web application built in asp.net, which uses resource files to support multiple languages. The problem I have is that I can only add a new language file in Visual Studio, and I have to rebuild the whole application to have a the new…
Zoliqa
  • 1,015
  • 2
  • 15
  • 36
2
votes
1 answer

How to compile .txt file to .resx with VS 2010

Can anyone tell me how to compile a .txt file to .resx using VS 2010 post build or pre build events?
nristic
  • 71
  • 6
2
votes
1 answer

How to copyng Default Language resx to a language specific resx file to be able to Generate resource DLL?

Is there a way to copy the default resx file (default language) to an actual satellite assembly but automatically? It appears that default language RESX files are not output as a DLL, only language specific ones. It appears i can FORCE to creation…
Martin
  • 23,844
  • 55
  • 201
  • 327
2
votes
2 answers

Redistribute resgen

Anyone know whether you can redistribute resgen.exe as part of your application? There doesn't seem to be any documentation on this on MSDN.
Darren
  • 230
  • 2
  • 8
2
votes
2 answers

How to fix VS2008 and VS2010 dev envts on Win7 x64

Ok, I'm in a world of pain at the moment. We'd been developing with VS2008 (VB.NET, mostly WinForms, also ASP.NET and Windows services) on Win7 x64, with specific requirements (that we can't get rid of yet), to target x86 and framework 3.5. We…
1
2 3