Mdbgcore.dll and linking IL

Mdbg is now included in the Whidbey Beta 2 SDK as a tool.
The source is not actually included in the SDK, so we’d like to also refresh the Mdbg sample. 

Mdbg originally compiled to many different dlls (corapi.dll, corapi2.dll, mdbgeng.dll, mdbgext.dll). However, for deployment reasons, we wanted only 1 dll. Conveniently, link.exe in Whidbey now links IL modules, so we used that to merge all the mdbg dlls into a single dll, “mdbgcore.dll”.  You’ll notice MDbg in the sdk is now distributed as 3 binaries:

  1. Mdbg.exe – the actual executable to run. This is pure IL and is cross platform.
  2. mdbgcore.dll – all reusable parts of mdbg outside of the shell. Mdbg extensions can link against this dll. This is pure IL and is cross platform.
  3. mdbgdis.dll – platform specific code for optional functionality such as viewing registers.

Since Mdbg can run via xcopy deployment, we intentionally prefixed everything with “mdbg” so that you can deploy it via “xcopy mdbg* .”

The dilemma is that the Mdbg sample needs to be completely buildable from the SDK. But the SDK doesn’t include link.exe. So the sample can’t produce the same dll layout as the sdk. 
This switch of dll names also causes Mdbg Beta 1 things (such as my gui extension) to not build against Mdbg Beta 2.