Microsoft 9GD00001 Computer Accessories User Manual


 
Chapter 13: Extending Visual Studio 2010 397
The QueryStatus method in Listing 13-4 checks the commandName to ensure it’s
working with the right Add-In. If so, it sets the status parameter to a combination of values
from the vsCommandStatus enum. In Listing 13-4, the status is supported and enabled.
This demonstrated how to create an Add-In. Next, you’ll learn how to deploy the Add-In.
Deploying an Add-In
There are two files involved in deploying your Add-In: a *.AddIn file and *.dll. The
*.AddIn file contains registration information for your Add-In, and *.dll is the class
library output assembly that contains your Add-In.
You can deploy the *.AddIn file by copying it into a folder that VS recognizes. There
is a specified set of folders that VS recognizes, but you can add your own folder location.
To see what the VS settings are, select Tools | Options | Environment | Add-in/Macros
Security. You’ll see a window similar to Figure 13-8. The Add-in/Macros Security
window also has options that allow you to determine if macros can run, if any Add-Ins can
load, or if Add-Ins are allowed to load over the Internet.
Figure 13-8 The Add-in/Macros Security window