开发者

How can I extract images from the .resources file created by a decompile of a .NET assembly?

I am working on recovering the source for an application for a client of mine. I have managed to recover the application code using .NET Reflector. But now I want to neaten the code and recreate开发者_开发技巧 the individual forms so will that I have the codebehind, designer and resx files for each form. The problem is that all the images are located in ".resources" files. How do I extract the images from these ".resources" files that were generated by Reflector?

I would prefer to use some tool, rather than having to extract the images programmatically, but I will resort to code if I can't find a suitable application. So here I am hoping that someone has done this before or knows of a viewer (preferably free!) for these resources files that would allow me to extract the images. Otherwise, code is also good; as I could then write my own little application to extract the images.


You can save the .resources file and then use the resgen tool (part of the VS2010 tools) to convert it back into a .resx file, using a command line like:

resgen foo.resources bar.resx

The .resx can then be added to a C# project. Once you've done this, if you try to open the individual images, VS2010 will offer to extract them into a standalone image file.


This program help you http://www.codeproject.com/KB/dotnet/Extracting_Embedded_Image.aspx


ILSpy should do this job - see features at http://wiki.sharpdevelop.net/ILSpy.ashx and the screenshot below.

How can I extract images from the .resources file created by a decompile of a .NET assembly?


JustDecompile can do that. You can right-click on a resource and select Save from the context menu.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜