Click to See Complete Forum and Search --> : Compiling a release version – debug info ?


Rockmover
October 1st, 2008, 01:55 PM
I am wondering why when you compile an EXE file in C#, and then you are running the exe and an error occurs. How does the system know the name of the methods, and variables associated with the error?

This is a bit worrying in that it seems it would make it very easy to “reverse engineer” a C# code? Is there a flag somewhere that should be set for code that is to be release to the public that hides this information? Or is this just the way the “just-in-time” compiler works?

Thanks!

eclipsed4utoo
October 1st, 2008, 02:48 PM
.Net is fairly easy to reverse engineer. I have not heard of any third party application that can stop people from reverse engineering your code. Maybe somebody else can give an application to do so. But there is no way in Visual Studio to "hide" your code.

boudino
October 2nd, 2008, 03:05 AM
This is a bit worrying in that it seems it would make it very easy to “reverse engineer” a C# code? Is there a flag somewhere that should be set for code that is to be release to the public that hides this information? Or is this just the way the “just-in-time” compiler works?!

But this is the way which .NET was designed, it uses a lot of metadata, like methods and variable names. Why and what do you want to hide? You are never to able to hide the code (unlesss you would encrypt it), because CPU must be able to read it - and than a man can too, even it is very difficult. Only thing you can do with it (aside the encryption) is obfuscation (search for obfuscator in internet), which means to change human readable identifiers to nonsens mixture of letters like "ClientRegistrationForm" to "aaaaaaab", which makes reading the code really hard, up to impossible.

If you want to protect your imaterial property, you have to rely on copyright and author laws.