Hello, I followed this example from Scott Hanselmans webpage: http://www.hanselman.com/blog/ReleaseISNOTDebug64bitOptimizationsAndCMethodInliningInReleaseBuildCallStacks.aspx
My goal is to get the line number from where the exception is thrown not where it is caught.
When I compile the code with the following build-script it wont work
SET FXROOT=%Systemroot%\Microsoft.NET\Framework\v4.0.30319
DEL *.exe /q
"%FXROOT%\csc.exe" /t:exe /out:NormalRelease.exe /debug:pdbonly /o+ NormalProgram.cs
NormalRelease.exe > NormalRelease32.txt
Output:
System.ApplicationException: generic bad thing
at NormalProgram.Main(String[] args) in c:\Development\DebugSymbols\DebugSymConsole\NormalProgram.cs:line 8
When I compile the code with this build-script it will work
SET FXROOT=%Systemroot%\Microsoft.NET\Framework\v2.0.50727
DEL *.exe /q
"%FXROOT%\csc.exe" /t:exe /out:NormalRelease.exe /debug:pdbonly /o+ NormalProgram.cs
NormalRelease.exe > NormalRelease32.txt
Output:
System.ApplicationException: generic bad thing
at NormalProgram.badMethod() in c:\Development\DebugSymbols\DebugSymConsole\NormalProgram.cs:line 18
at NormalProgram.Main(String[] args) in c:\Development\DebugSymbols\DebugSymConsole\NormalProgram.cs:line 8
The difference is that in my first example i compiled against the .net2-framework, and in my second example I compiled against the .net4-framework.
Any solutions to my problem would be appreciated, thanks.