3 ms·
> It was included for debug builds. I've worked with .NET since the pre-1.0 betas back in ~2001 (I know...appeal to authority). The source code was never inclu
by teh_klev 3y ago
> It was included for debug builds.
I've worked with .NET since the pre-1.0 betas back in ~2001 (I know...appeal to authority). The source code was never included in .NET debug or production builds. You could however use tools such as .NET Reflector (now owned by RedGate) to decompile the IL and reconstruct code as C#, VB etc. If you had the PDB files then you also had the symbols and could decompile to a close representation (variable names) to the original source.
This was a very useful feature because the .NET Framework managed code DLL's were and still are shipped obfuscated. This meant you could in the early days use ILDASM, and then .NET Reflector to find out what was going on inside the .NET Framework code.
Of course this created a market for obfuscators so that commercial and paid for shipping code was more difficult to reconstruct (especially since you wouldn't have the PDB files available).
You could do pretty much the same thing with Java.
Now if your binaries were NGEN'd [0], your chances of reverse engineering were reduced considerably because the IL is now gone and you're working with pre-compiled machine code rather than pre-JIT'd IL.
[0]: https://learn.microsoft.com/en-us/dotnet/framework/tools/ngen-exe-native-image-generator https://learn.microsoft.com/en-us/dotnet/framework/tools/nge...