0

When linking a native image, you specify /RELEASE so that link.exe stamps a checksum on the binary, so windbg doesn't complain about

*** WARNING: Unable to verify checksum for foo.exe

How do I do that for a .NET program? I've looked at the options in CSC.EXE, AL.EXE, but can't find anything like this.

Alex Budovski
  • 17,947
  • 6
  • 53
  • 58

1 Answers1

2

You can use editbin.exe in a post-build event to achieve the same. Check this answer for an example event, use /RELEASE instead.

It is only required for device drivers, so this doesn't matter for managed code.

Community
  • 1
  • 1
Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Actually, I think device drivers need a lot more than a valid checksum in the header. They need to be signed. I'm mostly concerned about cleanliness of my binary -- and don't want the debugger spewing this every time. Editbin is a reasonable workaround. Thanks! – Alex Budovski May 31 '12 at 18:37