Use WinDbg with Psscor2 or Psscor4 extension (depending version used by you application). Unfortunately there is no version for .NET 4.5 yet. After setting up the debugging environment (installing WinDbg and copying to its folder Psscor files), create a dump of the process. You can do it easily for example with help of Procdump tool:
procdump -ma <PID>
Then load dump using File -> Open Crush Dump option. Load appropriate version of Psscor:
.load psscor4
Then execute command to download symbols from Microsoft servers (if needed), make sure that you have an internet connection:
!symfix
And from now you should have access to plenty very interestings command (look for !help
to list them). To see finalization queue:
!finalizequeue
There you will have a list of object, like:
7aa143e0 166 20,584 System.Diagnostics.PerformanceCounter
79b5f6c8 543 21,720 System.Reflection.Emit.DynamicResolver
673893a8 953 22,872 System.Web.HttpResponseUnmanagedBufferElement
This might help you a lot. But you can also inspect those objects (!do 7aa143e0
), find references (!gcroot <address>
) etc.