Search code examples
c#dynamics-crmdecompiling.net-reflectorresource-dll

how to edit and recompile a c# resource-dll


I have been trying to edit a resource file, to add support for a new language, but here is what happens,

in some dll decompilers I can not see the resource file, (Resource Turner, PE Explorer ...)

Resource Tuner

in .Net Reflector, I see the the resource file, but I can not edit it

.Net Reflector

what I'm able todo is to Disassemble the dll using the Reflector FileDisassembler tool, this gives me a C# sln file, which is not appear to be a complete project

VS

but when I edit and re-Compile the project in to a dll file, and put it back where it was supposed to be, it generates error, as the dll is not valid

can anyone please help me out or just show me the correct direction.

P.S. 1, apparently the dll sign process is not a problem, since this dll is just a resource file and the application just signs it in the runtime or some thing like that, I'm not quite sure about how it's done, but I have read that I do not need to be worried about this.

P.S. 2, the thing I want to do is 100% doable, as some companies have been doing this method for a long time.


Solution

  • Not that anyone cares, but here is the solution:

    the key point is that, it is not necessary for the resource dll to be signed with the application .snk or even be signed at all, but it is mandatory that the main resource dll (eg. App.string.dll) and the satellite dlls (eg. /ar/App.string.resource.dll) has the same Public Key Token (equal one, or even null).

    so to be simple, one needs to decompile the main resource dll, add the resources from the sattelite dll into the main project, and compile it with VS so they both have a same Public Key Token