How-To Test a Snap-in

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

To test your snap-in, run MMC 3.0 (mmc.exe) and use the Add/Remove Snap-In menu option to add your snap-in from the installed snap-ins list. Note that when MMC has loaded your snap-in, the dll is in use, and cannot be re-compiled until you either remove it from the console, or close MMC.

If you wish to set breakpoints or walk through your code, you can instruct Visual Studio to run MMC for you, giving you access to your managed snap-in code. Under the ‘Debug’ settings in the project properties, select the ‘Start external program’ radio button and enter the full path to mmc.exe. When the snap-in runs, you will be able to debug it.