ConfuserEx
ConfuserEx copied to clipboard
Error whith Costura.Fody
- ConfuserEx Version:
- Target Framework:
- Operating System:
Steps to Reproduce:
- intall the package costura foody to an proyect
- install another package like Newsoft.josn
- try to obsfucate it and
ConfuserEx Version:
Target Framework: 4.8 Operating System: windows 11
@mkaring
ConfuserEx needs all the dependencies to function properly. Costura.Fody embeds these dependencies into the module and ConfuserEx is unable to resolve them as it expects them to be present next to the file or in other locations such as GAC.
Solutions:
- If your file is a executable you can remove Costura.Fody and instead of the
compressor
packer which has the option to embed dependency dlls. This is a superior option as the dependencies are also encrypted. - Disable cleanup in Costura.Fody and prevent it from deleting the dlls from the output folder (note: they will still be embedded.
- Navigate and open FodyWeavers.xml in a text editor of your choice.
- Modiy the contents to set the right costura option somewhat like this:
<Weavers> <Costura DisableCleanup='true'/> </Weavers>
I'm too slow. Thanks @ElektroKill
This issue needs more information and has not had recent activity. Please provide the missing information or it will be closed in 7 days. Thanks!
@mkaring
I got 2 ideas :
- What if we extract all embedded dll files during the analysis phase ?
- What if then we remove any Fody code and select
Compressor
packer automaticaly ?
Would you accept a PR ?
I Just installed this nuggets
then i copiled and try it to obfuscate
The workaround provided by @ElektroKill is the only thing that currently works. In that case the embedded assembly will still work, but is not subject to any protection.
The proper support for Costura will be part of the 2.0 release.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.