I am trying to profile and instrument my VSTO Excel plug-in using Visual Studio 2012 on Windows 8. I would like to collect managed function call counts and their timings.

I have no problems with the default sampling option, but the results are generally too high level for me (i.e. ntdll.dll and wow64.dll are the binaries doing "all the work"). However, my attempts to instrument the plug-in always yield "no data" results; I've tried to attach to an existing Excel process, pause and switch the profiling method to "Instrumentation", as well as using the Performance Wizard to create an instrumented profile.

In this case, the output window shows messages like the following:

Data written to C:\project-source\Report130912(3).vsp.
Profiling finished.
File contains no data buffers
File contains no data buffers
Analysis failed

Is this scenario supported for Visual Studio, or have I done something wrong? Is there another tool I can try to obtain this data?

有帮助吗?

解决方案

I figured this out by... making my search query more general :)

http://mikedoszhang.blogspot.com/2011/10/profile-net-office-add-in-through.html

In essence, each binary that requires instrumentation must be registered for COM interop and built for the x86 architecture (not Any CPU). Also, you need to explicitly specify the binaries that you want to instrument.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top