IL offsets missing when silverlight assembly is compiled in release mode

前端 未结 1 425
暗喜
暗喜 2020-12-31 18:46

I followed these instructions to add IL offsets to Silverlight stack traces. This works great when building in DEBUG mode however our production/qa build process compiles e

相关标签:
1条回答
  • 2020-12-31 19:17

    The DebuggableAttribute is added by the compiler to control the JIT code generation. In fact, code gets generated differently when it is supposed to be debuggable and certain optimizations do not take place.

    If you need to tweak the assembly generated, you need to dump the IL, alter the attribute and recompile it back via: ildasm creates a human readable IL source that can be altered by a convetional text editor, while ilasm is used to recompile it back.

    This process can be automated in your build. Just remember that you are messing up with something generated by the compiler and not supposed to be touched.

    Important: the assembly needs to be signed again in case strong name and/ir authenticode is used.

    0 讨论(0)
提交回复
热议问题