1

I was looking into embedding custom version strings using in assemblies a while back, and one approach that the documentation suggested was to embed a windows resource.

The only way I can see to create a windows resource is to use the 'Native Resource Template', but the template is a binary file that isn't suitable for using with subwcrev. Is there a way of creating a windows resource as part of a C# project that starts with a human-editable text file, similarly to the .rc files that C++ projects use? If so, how?

Community
  • 1
  • 1
Simon
  • 25,468
  • 44
  • 152
  • 266

2 Answers2

1

It seems that you don't have VS2005 or VS2008 and are looking to create windows resources. Yes, the ".resources" files are binary, but you can create a XML file or a text file which gets converted to this binary file. Take a look at the documentation of the ResGen tool. It is available with .NET.

Rohit
  • 7,449
  • 9
  • 45
  • 55
  • I have VS2008. I can create windows resources from a text file in a C++ project, but in a C# project they're either not windows resources, or not generated from a text file. – Simon Oct 15 '08 at 13:23
  • BTW, I don't mean CLR ".resources" files, I mean windows ".res" files. – Simon Oct 15 '08 at 13:24
0

In VisualStudio 2005 or 2008 (at least), you can add a new "Resources File" item to the project (located under "General" in the "Add new item" dialog). This is a simple XML file, which is perfectly human-editable - all within VisualStudio. I don't know how SubWCRev works, but if it manipulates text files, this should do it.

Phil Reif
  • 386
  • 1
  • 8
  • There's no option to add version resources to that, though. I don't think it compiles to a *windows* resource, but rather to some sort of dotnet resource. – Simon Oct 14 '08 at 09:53