0

I am trying to obfuscate my Windows application (EXE) written in .NET Core 7 app with Dotfuscator

When I add my input EXE, I get the following message :

Invalid input Assembly: (file_path) This is not a managed module (file_path)

I have tried to use the EXE before and after publish to win-x86, with the same result

Does anyone have experience with this issue?

Kind regards

THEoneANDonly
  • 382
  • 1
  • 2
  • 16
  • The message is accurate, the project.exe that you got after building is not a managed module. It is the .NET host, its job is to find the runtime, load and initialize the CLR and get your Main() method jitted so it can start executing. Same kind of job that java.exe and python.exe do, bootstrapping the virtual machine. Only obfuscate your own code, that starts with project.dll – Hans Passant Mar 17 '23 at 13:31
  • So I'm supposed to obfuscate the DLL (my_project.dll), and then republish this into an EXE so that my code is obfuscated? (becomes my_project.exe) – THEoneANDonly Mar 17 '23 at 13:35
  • No, don't republish or otherwise mess with the .exe. Even if it could be obfuscated (it can't), there is no point to it since the source code is readily available at github. Only obfuscate my_project.dll. Your code. – Hans Passant Mar 17 '23 at 13:39
  • I understand, I use publish profile 'produce single file' within Visual Studio, so I meant: am I supposed to obfuscate my_project.dll and then re-make a publish of this "single file" ? – THEoneANDonly Mar 17 '23 at 13:49
  • https://stackoverflow.com/questions/61896420/obfuscator-for-net-core-single-publish-files – Hans Passant Mar 17 '23 at 13:54

0 Answers0