Over a million developers have joined DZone.

Obtaining the CoreCLR DAC DLL for Windows Phone

Download Forrester’s “Vendor Landscape, Application Performance Management” report that examines the evolving role of APM as a key driver of customer satisfaction and business success, brought to you in partnership with BMC.

Three years ago I blogged about obtaining SOS.dll and mscordacwks.dllindirectly from the Microsoft KB websites in case you only have a dump from the production system but can’t gain access to copy these files over.

(Reminder: SOS.dll is a WinDbg extension for debugging .NET processes and dump files. The DAC, or mscordacwks.dll, is a helper library used by SOS to access the inner workings of a specific CLR version’s data structures. The DAC is also used by ClrMD, a managed library that provides an API replacement for the SOS extension commands.)

It turns out that for Windows Phone applications (using the Windows Phone CoreCLR), there is no official place online where you can find the various CLR versions alongside with SOS and the DAC. In fact, it seems that Microsoft isn’t making SOS.dll for Windows Phone available as part of the phone image, so there is no way for you to put your hands on it. This is also why WinDbg’s !analyze -v command fails to provide any .NET-related information when you open a dump from a .NET Windows Phone application.

Not all is lost, however. First, we still have Visual Studio, which doesn’t need SOS. The Visual Studio dump debugging engine requires only the DAC DLL, which is available on the Microsoft symbol server. Just drop the dump file into Visual Studio and start debugging it.

SIDENOTE: Interestingly, even though the Windows Phone CoreCLR is built for the ARM processor, Microsoft makes available x86 versions of the DAC, so you can use them from your Windows desktop. For example, mscordaccore_x86_arm_4.0.30508.00.dll is the DAC you should use to debug Windows Phone processes using CoreCLR 4.0.30508.

If you need the SOS extension commands which aren’t provided by the Visual Studio dump debugging interface (such as !SyncBlk!ThreadPool,!DumpDomain etc.), you can use ClrMD to build your own replacements of these commands. I have a blog post explaining how to use ClrMD for a couple of scenarios. More on that in a future post.

See Forrester’s Report, “Vendor Landscape, Application Performance Management” to identify the right vendor to help IT deliver better service at a lower cost, brought to you in partnership with BMC.

performance,coreclr,.net,windows phone,debugging

Published at DZone with permission of Sasha Goldshtein, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}