简体   繁体   中英

How can I create a windows resource to embed in a .NET assembly, starting from text?

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM