Teevus
Teevus

Reputation: 1124

Code Profiling of VSTO application

I'm looking for a free code profiler (performance profiler, not a memory profiler) which works for VSTO applications (specifically Excel in my case, but I gather that if it works for one, it should work for all).

I have tried Eqatec Profiler, but it can't seem to launch the application from the profiler (The Run app button is greyed out, which I'm gathering is because the VSTO application is compiled into a dll which runs in-process with Excel.exe).

If anyone has successfully used Eqatec or another free code profiler to profile a VSTO application, I'd be interested to hear how you did it.

Upvotes: 4

Views: 1519

Answers (2)

AMissico
AMissico

Reputation: 21684

Have you tried Microsoft's CLR Profiler?

I have used it with great success many times.

Upvotes: 0

Richard Flamsholt
Richard Flamsholt

Reputation: 693

What you're doing should be possible with EQATEC Profiler.

When you're simply instrumenting one or more DLLs then there is no distinct "application to run": you simply have some instrumented DLLs, but the profiler doesn't know in what way you intend to use them.

However, the instrumented assemblies are (along with the runtime-module, EQATEC.Profiler.RuntimeFullNet.dll) always completely "self-contained", meaning that they perform the timing themselves as soon as the methods within them are used. So you simply need to have your VSTO app load the DLL as usual and voila, the DLL will itself start accumulating timing information and start listening for a connection from the profiler with which you can then take snapshots etc.

So to summarize:

  1. Build you DLL and keep the profiler running
  2. Have your VSTO app load the DLL (however you do that)
  3. The profiler and instrumented DLL should now be connected (see the Run-tab)
  4. From within the profiler you can now take snapshots

I hope this helps. If not then let me know.

Upvotes: 2

Related Questions