Hi guys!
So here my question, for the most brainy guys here. After so many hours of research on the net, I found literally no good solution for edit/compile a dll project easily. I already use Dnspy and DotPeek, to de-compile a dll into a project, and it works perfectly. The problem is to re-compiler, no matter what I use, it’s not working. Many errors appear and do not accept the compilation.
Do you have easily understandable solutions? I don’t have any knowledge of programming. Then why I want to edit a dll you ask? Well, I only want to play with a friend on an old game, and the camera is really poorly managed. The only mod that modifies that, is out of date. So, I decided to update it myself.
If your dll has references to other dlls it may not be able to compile without them. Decompilers are mostly just to see what the original code looked like. Not make a full working program.
I’m sorry but if you have no knowledge of programming… you will have difficulty when trying to do something that requires it.
Note that VS is free for personal use, but like the other comment already said, dlls are dependent on other dlls, and may have internal resources that don’t even show in a decompiler.
It would be a challenge for an experienced programmer. Not to say someone who has no programming knowledge.
As the other comments have mentioned, this is usually impossible due to interdependency on other libraries that aren’t present at runtime. (For instance, recompiling a managed Unity3d assembly cannot be done as you would have to recreate the program and project structure and gain access to many proprietary files in order to do so.)
However, there is a way, it’s just difficult. Using dnspy, you can edit the MSIL, which won’t require a full recompilation. This might be a little tough though, as it can be hard to figure out which bits of code do what exactly, however, dnspy does help with this, and you can use a program called LinqPad to translate your own code into MSIL, and copy it over certain parts of the existing code, but this is likely unreasonable for large edits.
(Depending on your situation, there may be other ways around this too, such as Partiality for Unity3d as per the example above, the answer here will be very different on a case by case basis of course.)
If anything in this answer looks off, please let me know, apologies in advance…
https://twitter.com/buhakmeh/status/1339212112116281344/photo/1
I guess other people are looking at this from a different perspective because in my world it is completely possible.
If you’re using.Net core, you can use the dotnet command-line utility.
That would be an answer to the question in the title.
If it’s an old game, I doubt it uses .NET Core. Even if it did, OP would still run into the same problems others have mentioned. Re-compiling a decompiled dll is not an easy task.
I had to decompile and recompile a dll from production once. I had different results using different decompilers. I can’t remember what eventually worked but give a few a try. And for the errors, sometimes there could be many but all come down to just one or a few. Fix the code ones as well as you can. Is the dll available online? Others may be able to help.
C# devs null reference exceptions.