Profiling managed code add-ins
Published 14 May 2018
Microsoft Visual Studio, Microsoft Word, Microsoft Excel and Microsoft SQL Server Management Studio are all examples of desktop applications which host the .NET Common Language Runtime. You can create .NET add-ins for these programs.
The procedure for using ANTS Performance Profiler to profile a native desktop application that hosts the .NET runtime is similar to that for profiling other .NET applications.
To profile managed code add-ins:
- From the list of application types, click .NET executable.
- Type or browse to the Path to .NET executable that you want to profile.
Note: this is the native application that contains your add-in; for example, SQL Server Management Studio.
You can use the dropdown list to select a recently-profiled application. - If you need to specify any command line arguments for the application, click Show startup options.
You can add arguments and change the working directory for the profiling session here. The working directory is the path where the application will start. By default, this is the directory where the executable is located. - Select the required Profiling mode, Chart performance counters, and Additional profiler options;
For more information, see Choosing application types and settings and Setting up chart performance counters. - Click
The application starts, and you can use it to interact with your add-in.
During a profiling session you can interact normally with your application and with the profiler.
When you have finished interacting with your web application, click the button in ANTS Performance Profiler to stop profiling.
Profiling different applications
The same approach will work with all other hosting applications. For example, to profile a Visual Studio .NET add-in, enter the full path to devenv.exe as the .NET application that you want to profile.
You can also profile a managed code Microsoft Management Console (MMC) snap-in in the same way; select mmc.exe as the .NET executable, add the snap-in, then interact with it.