Reputation: 320
I could do reverse engineer of other custom dlls (my own created .net
assemblies) successfully but I couldn't do it on mscorlib.dll
with the same steps.
I have tried to generate pdb of mscorlib.dll
using jetbrains dotpeek.
My visual studio debugging option has been set to the folder containing that pdb.
I tried to put the mscorlib.ini
file to set the code Optimization to No, like this:
[.NET Framework Debugging Control]
GenerateTrackingInfo=1
AllowOptimize=0
and put the file on the same location where the temporary dll is loaded (e.g.
C:\Windows\Microsoft.NET\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089).
When I attach my VS to a process, I could see that the Optimized value is still 'Yes' in Visual Studio's Modules.
Appreciate if anyone can guide me the step by step instructions on how to debug the mscorlib.dll when attaching VS to a process using mscorlib.dll.
Thanks.
Upvotes: 2
Views: 1427
Reputation: 5088
mscorlib.dll is ngen'd. You'll also need to set COMPLUS_ZapDisable
environment variable to prevent CLR from loading ngen'd assemblies:
set COMPLUS_ZapDisable=1
Upvotes: 2