-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support modifying .dlls via CLI #318
Comments
The CLI app is very primitive and is currently written in a way that allows only decompilation of a given file. It lacks all the necessary infrastructure to run the other components of dnSpy like assembly editing, debugging, etc. Extending the CLI app to add more functionality is something I want to do especially for debugging. However, I'm not sure how text-based C# level assembly editing would be implemented in a CLI. If you want to apply C# level patches it is probably best to fully decompile the file using dnSpy or ILSpy to produce a C# project file/solution file, apply text-based patches onto the source code, and then recompile. It is not the ideal way of applying patches to files though. The C# editing is only meant to be a quick way of applying patches to files manually. Automated patching should always do what is described below. Ideally, you'd want to use a lower-level library like Hope this answers your questions! |
Problem Description
I am currently able to modify .dlls via editing C# sources in GUI. But there seems to be no documented way to patch .dll via
dnSpy.Console.exe
.I suspect that it should be possible to decompile .dll fully to source code, introduce changes and compile it back, but I am not sure how (and if contents of decompiled files are guaranteed to be the same to reliable apply diff patches). But if it's the intended solution, then I'm dumb, sorry.
Proposal
Add CLI flags to introduce changes to .dlls based on modified source code of methods.
Alternatives
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: