Eerik Sweden
Eerik Sweden

Reputation: 415

How to view a resource file made with ResourceWriter()?

I have tested some code that generates a resource file:

// Creates a resource writer.
  IResourceWriter writer = new ResourceWriter("myResources.resources");

  // Adds resources to the resource writer.
  writer.AddResource("String 1", "First String");

  writer.AddResource("String 2", "Second String");

  writer.AddResource("String 3", "Third String");

  // Writes the resources to the file or stream, and closes it.
  writer.Close();

How can I view what is saved in the file? Is there any resource viewer that I can use?

Upvotes: 0

Views: 545

Answers (1)

Sach
Sach

Reputation: 10393

Looks like you can use Resgen.exe which comes with Visual Studio Tools (after VS 2010).

Open up Developer Command Prompt and then you can convert your .resources file to a bunch of different file types, including .txt.

C:\>resgen myResources.resources myResources.txt

Will convert it into a .txt file.

With one caveat though;

Conversion to .txt fails if file contains non-string resources (including file links)

More info here.

Upvotes: 1

Related Questions