Microsoft Dynamcis CRM developer toolkit that comes with the CRM SDK provides a wide variety of useful features. If you have created a Dynamics CRM Solution in Visual Studio using the Developer toolkit add-on that gets installed onto your Visual Studio, you can easily deploy your Dynamics CRM code directly by right clicking on the CRMPackage project of the solution and clicking deploy. This Deploy command will build and deploy all your plugins, custom workflows, web resources, etc.

The deploy command can be easily accessed from the Visual Studio Command prompt. You can then call the deploy command in the command shell. To make it easier, you can create a batch file that calls Visual Studio command prompt, navigates to where your CRMPackage project is and then finally calls the deploy command. This batch file can then be scheduled to run using a Windows Scheduled Task to automate the deployment of your Solution at pre-scheduled times.

Sample code for the deployment automation batch file to deploy the CRMPackage project is below:

Nice work! I had been trying to figure this out for some time now, but was trying to do it directly through an msbuild call. I was getting nowhere. The devenv call works great and this is now the missing piece to a large amount of build automation that I’m putting together. I can’t thank you enough for sharing!

Hi, I am able to execute this command but this gives a popup to connect to the Microsoft Dynamics CRM Toolkit. How can we pass all the information to that through command line. Any help on that would be of great help.