Automating the Plugin deployment process has helped our team reduce errors and speed
up the development and debugging of our custom plugins and workflows. Using
a combination of the PluginDeveloper included in the SDK (<sdk install>\tools\plugindeveloper\),
a batch file, and
configuring an external tool in Visual Studio allows our CRM build manager to deploy
plugins to Dev, Test or Production directly from Visual Studio.
Our team uses separate register.xml files for Dev, Test and Prod that are
set in Visual Studio to Copy always in the Copy to Output Directory
in the Visual Studio’s File Properties window. The batch file copies
the project’s output directory to the PluginDeveloper’s directory and
prompts the user to select which environment to deploy to.
Build the PluginDeveloper Executable
1. Follow the Readme.doc in the project root.
2. Copy the RunPD.bat file to the PluginDeveloper.exe’s
location (we use a common file system path \CRM\tools\PluginDeveloper)
Configuring Visual Studio’s External Tools
1. Select the Tools – External Tools …
2. Click Add and enter the details for the batch file
a. For Arguments specify $(BinDir) for select Binary
Directory from the options
Create register.xml Files for Each CRM Environment
1. The batch file expects to find files named:
a. DEV register.xml
b. TEST register.xml
c. register.xml
Running the Tool from Visual Studio
1. Select Tools – Run Plugin Developer
2. At the menu, type 1,2 or 3 for the desired environment and
press Enter
3. Enter password when prompted
*Credit goes to DosTips.com for
the menu framework