Skip to content


Subversion checkout URL

You can clone with
Download ZIP
C# File Resource Management Library
C# HTML Batchfile
Latest commit 9b1fd52 @dblock Merge pull request #26 from hypersw/master
ANSI -> Wide
Failed to load latest commit information.
.nuget Fixed issue #10 - System.OverflowException: Arithmetic operation resu…
Article Added partial support for RT_FONTDIR and RT_FONT.
Build Added Build folder for MSBuild community tasks
Docs Added a note on loading resources with different ID and language.
Source Test the change of LoadLibraryExA -> LoadLibraryExW.
packages Updated build script and projects to sync up correct verion of MSBuil…
.gitignore dot
LICENSE Added readme, links, etc. Added AppVeyor CI.
ResourceLib.proj Fixed issue #10 - System.OverflowException: Arithmetic operation resu…
ResourceLib.sln Fixed issue #10 - System.OverflowException: Arithmetic operation resu…
appveyor.yml Added AppVeyor CI.
build.cmd Updated build script and projects to sync up correct verion of MSBuil…

ResourceLib C# File Resource Management Library

Build status

There are several good articles about reading and writing resources from/to a compiled binary. Most focus on retrieving module version information and modifying version information, mostly in C++. Some detail the same operations for cursors, icons or dialog resources. There is, however, no single .NET library to retrieve and save any type of resources, or any library to edit version resources specifically.

This project is a framework that enumerates resources and implements both read and write of the file version VS_VERSIONINFO, string resources such as company, copyright and product information, RT_GROUP_ICON and RT_ICON, RT_CURSOR, RT_BITMAP, RT_MENU, RT_DIALOG, RT_STRING, RT_ACCELERATOR, RT_FONT and RT_FONTDIR and RT_MANIFEST resources. It's unit-tested and well documented.


Getting Started

In your project add a reference to Vestris.ResourceLib.dll and a namespace reference.

using Vestris.ResourceLib;

The following example demonstrates enumerating resources by resource type. From the sample atl.dll in the Windows system directory, you will typically get the following resources: MUI, REGISTRY, TYPELIB, and RT_VERSION resource.

string filename = Path.Combine(Environment.SystemDirectory, "atl.dll");
using (ResourceInfo vi = new ResourceInfo())
    foreach (ResourceId id in vi.ResourceTypes)
        foreach (Resource resource in vi.Resources[id])
            Console.WriteLine("{0} ({1}) - {2} byte(s)",
                resource.Name, resource.Language, resource.Size);



Fork the project on Github, commit changes to your local repository, push changes to your fork, and make a pull request. Bonus points for topic branches. Also see Setting up a Development Environment.

Copyright and License

Copyright (c) Daniel Doubrovkine, Vestris Inc., 2008-2013.

This project is licensed under the MIT license.

Something went wrong with that request. Please try again.