Search code examples
dynamics-crmmicrosoft-dynamicsdynamics-crm-2016

Deploying single files to Dynamics 365 while developing (e.g. web resources)


I am developing my first simple app in Dynamics 365, and one of my main pieces is a Web Resource that involves a lot of tweak-save-test-repeat workflow. Up to this point, every time I have made a tiny change to my web resource, I have been deploying it by opening the solution customization settings, navigating to my particular Web Resource, opening it, clicking "Text Editor" button, pasting in my updated Javascript code, and saving/publishing the changes.

This process is tedious, and I would like to find a way to automate it. I have been researching Dynamics 365 deployment tools, and I have found the CRM Package Deployer tool, but from what I can find it requires me to set up an entire deployment package (a giant XML file) comprising my entire customization, rather than the single file I am currently working on. Is there some way to automate deploying a SINGLE FILE with these (or other) tools? Or is it possible to deploy a package with ONLY A SINGLE FILE rather than re-deploying the entire solution's package each time I just change the one file?


Solution

  • Check out the open source alternative to the SDK's developer toolkit called Dynamics CRM & 365 Developer Extensions which you can install right into VS. It makes deployment of web resources a snap. Basically, you map individual JS/Html/Css/etc files to their corresponding web resources in CRM, and then once they are mapped all you have to do to deploy is right-click and choose Publish to CRM.

    That tool is great, but if you really want to speed up your web resource development, you should use Fiddler. In Fiddler, turn on Autoresponder and setup a mapping for the file you are working on. When Fiddler sees a request that matches a mapping, it doesn't send the request to the server and instead returns the file from your hard drive. This technique offers a dramatic speed improvements for developing web resources. There's also a free tool for Fiddler called Imposter that makes the process easier. Search the web for "dynamics crm fiddler web resources" to read about this technique.