0

I am using Visual Studio 2019 to build my C# .NET application, and I want to remove the names of functions/classes from the output file.

I have changed "Debugging information" in the project settings from Pdb-only to None, but I can still see the symbols by attaching a debugger (such as dnSpy) to the program.

I expect the built .exe file to not reveal the name of my functions and classes.

Anas Alweish
  • 2,818
  • 4
  • 30
  • 44
shavit
  • 842
  • 1
  • 7
  • 17
  • 7
    .NET includes metadata for reflection purposes. Removing the names of symbols is not possible. This is why there's a market for obfuscation tools to rename them to something unintelligible; making them entirely anonymous is not possible. – Jeroen Mostert May 22 '19 at 11:12
  • 1
    Why? What problem this info causes? The first thought is [obfuscate](https://stackoverflow.com/q/19163701/1997232) it, but maybe it's something different? – Sinatr May 22 '19 at 11:15
  • We've been using Dotfuscator which replaces the methods & class names with 'a, b, c, d,..' in our client application. There are other, similar obfuscation tools available. – Carra May 22 '19 at 11:15
  • @Sinatr I am teaching my friend basic reverse engineering for .NET assemblies, and having the symbol names makes it so they do not need to understand and name what each function or class purpose is – shavit May 22 '19 at 11:30
  • "Basic reverse engineering" means running ILSpy on it and getting back more or less instantly readable C# -- quite easy to teach! Tampering with the names alone has limited use, which is why commercial obfuscation tools go considerably further. – Jeroen Mostert May 22 '19 at 11:41
  • Reverse-engineering can be quite useful, you tend to be able to file a much better bug report or find a workaround yourself. Why you are trying to teach somebody such a skill, maximizing the odds he will fail at it is not obvious. There's no point to that. – Hans Passant May 22 '19 at 13:00
  • I don't understand you guys. I'm asking a question and you all give me comments about this even though they're unnecessary. Is it that hard to say "no, you can't do that" – shavit May 22 '19 at 17:49

0 Answers0