Registering a Plug-in Using the Plug-in Developer Tool
![]() |
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
This walkthrough demonstrates how to deploy a sample plug-in to the database of a Microsoft Dynamics CRM 4.0 server using the PluginDeveloper tool. A sample plug-in is provided in the SDK\Walkthroughs\Plugin\CS\AccountCreate folder to test run the PluginDeveloper tool. The register.xml configuration file, required by PluginDeveloper, is also provided in that same folder. When executed, the plug-in creates a followup task after a new account is created.
Note that the register.xml file is a configuration file that PluginDeveloper uses to register a plug-in. When you develop your own plug-ins and use PluginDeveloper to register them, you must edit register.xml or create a new one as appropriate for your plug-in. Instructions on the format of the configuration information is provided in the register.xml file.
During this walkthrough you will learn how to do the following:
- Build and copy required files.
- Run the PluginDeveloper tool.
- Test the Sample plug-in.
Prerequisites
To complete this walkthrough, you will need the following:
- Visual Studio 2005 or Visual Studio 2008.
- Completion of the Build the Plug-in Developer Tool walkthrough.
- Access to the SDK\Bin folder.
- Access to a working installation of Microsoft Dynamics CRM 4.0.
- A Microsoft Dynamics CRM system account with either the System Administrator or System Customizer security role that is also a member of the Deployment Administrators group in Deployment Manager. Use this system account when directed to specify a username in the register.xml configuration file in step 2 later in this topic.
Step 1: Build and Copy Required Files
- Build the sample AccountCreatePlugin assembly if you have not already done so. To do this, follow only steps 1 thru 4 of the Creating a Simple Plug-in walkthrough. Alternately, the complete source code for the plug-in can be found in the SDK\Walkthroughs\Plugin\CS\AccountCreate folder. You only need to add references for the Microsoft.Crm.Sdk.dll and Microsoft.Crm.SdkTypeProxy.dll assemblies to build the plug-in's Visual Studio project.
- Copy the AccountCreatePlugin.dll assembly, located in the bin\Debug folder of the project, and the register.xml file located in the SDK\Walkthroughs\Plugin\CS\AccountCreate folder to the same folder as the PluginDeveloper.exe executable. If a register.xml file already exists in that folder, you may want to rename it so that it does not get overwritten.
Step 2: Run the PluginDeveloper Tool
To run the tool, follow these steps
- Edit the register.xml file and verify that the server, organization, domain, and user name are correct for your Microsoft Dynamics CRM installation. Make any changes needed and save the file.
- Open a command prompt and change to the folder where the PluginDeveloper.exe executable file is. For example: cd SDK\Tools\PluginDeveloper\bin\Debug.
- At the command prompt, type PluginDeveloper.exe.
- When you are prompted to, enter the password of the user account that you specified in the register.xml file and press ENTER.
- After the program completes, press ENTER one or two times to close the console window.
- View the log file, named "Plugin Registration Log.txt", which can be found in the folder that the tool runs from.
- (Optional) Repeat steps 3 through 5 to have the tool unregister the sample plug-in and register it again. The tool aids in the edit/compile/deploy/test development cycle.
Test the Sample Plug-in
To test the plug-in you can create an account. This will trigger the plug-in code to run.
- Run the Microsoft Dynamics CRM Web application.
- Create a new account and save it.
- Navigate to your Workplace to see the available activities. You should see a new task activity with a subject of "Send e-mail to the new customer". The plug-in created this task.
- When you are done testing the plug-in you can unregister the plug-in assembly using the Plugin Registration tool.
See Also
Concepts
.gif)