- New in 3.9: Added support for Portal content snippets
- New in 3.8: Added support for client ID/secret and MFA
- New in 3.7: Automatic Portal cache refresh (xRM CE Portal only)
- New in 3.6: Auto-deployment of linked items
- New in 3.5.3:
- New in 3.4.3: Added better support for localised web pages
- New in 3.3: Added link item to reduce code duplication for Portal artefacts
- New in 3.2: Added option to auto deploy on save for Portal artefacts. Added specification of MIME Type and Display Order for Portal web files.
- New in 3.1: Added deployment of Adxstudio/CRM Portal JS, CSS and Liquid
- New in 2.8: Automatically adds web resources to CRM solution. Added right-click deploy from Solution Explorer
- New in 2.7: New shortcut keys to deploy current project’s assembly
- New in 2.6: RibbonDiff deployment
- New in 2.5: Tighter integration with CRM Developer Toolkit projects. New shortcut key to deploy web resource in current code editor.
I have released a new Visual Studio extension that aims to quicken the dev/debug cycles for CRM developers.
This extension allows you to quickly deploy web resources and assembly changes to CRM, and also to attach the debugger to the Async Service, IIS or the Sandbox Worker process using keyboard shortcuts.
Regarding assembly deployment, the intention is to only deploy binary changes. The tool therefore does not deal with assembly or plugin step registration in CRM. To use the deploy assembly commands, you would need to first register the assembly with CRM using other tools (e.g. the Plugin Registration tool).
Below is a description of the actions performed by each of the command.
Note that most of the commands below require you to run Visual Studio under an account with local administrator permissions.
Deploy Assemblies to Bin Folder (Alt + D, B)
- Builds the solution’s StartUp project
- Recycles the CRM app pool and restarts the Async Service to release locked files
- Copies the StartUp project output files to the CRM’s bin folder on the local machine
Deploy Assembly to CRM Database (Alt + D, D)
- Builds the solution’s StartUp project
- Connects to CRM (using configured connection string) and upload the project’s main output file to the CRM database
- Copy the debug file (i.e. the .PDB file) of the project’s main output to CRM’s bin folder on the local machine
This command connects to CRM using a connection string. This is set by a property at the solution level in the Solution Explorer.
This command only deploys the project’s main output, i.e. single assembly. All other files are ignored.
Deploy Assemblies to GAC (Alt + D, G)
- Builds the solution’s StartUp project
- Install all DLLs found in the project’s output folder to the local computer’s GAC
- Recycles the CRM app pool and restarts the Async Service to ensure the new binaries are picked up
Deploy Web Resources (Alt + D, W)
- Saves and deploys files under the WebResources folder of the StartUp project as web resources
- Publishes the web resources
This command looks for files under a folder named WebResources and connect to CRM (using the specified connection string) to upload them as web resources. The name of the web resource in CRM is determined by the folder structure of the file within the project. Below are some examples of how the CRM name will be determined.
- If the file is located at WebResources\new_script.js – the CRM name will be new_script.js
- If the file is located at WebResources\bnh_scripts\account.js – the CRM name will be bnh_scripts/account.js.
Note that CRM requires the name to have a prefix so ensure that you include this in the folder names (for nested files) or file names (for files directly under the WebResources folder).
The web resource type is determined base on the file extension. Files with unrecognised extensions are ignored.
Web resources are created if they do not already exist in CRM, otherwise they are updated.
Attach to Async Service (Alt + A, A)
- Attach the debugger to the Async Service on the local machine
Attach to IIS (Alt + A, I)
- Attach the debugger to the CRM app pool on the local machine
Attach to Sandbox Worker Process (Alt + A, S)
- Attach the debugger to the Sandbox Worker Process on the local machine
Please note that to debug Sandbox plugins, you will need to make a change in the Registry to disable the shutdown of the Sandbox Worker process as detailed here: https://msdn.microsoft.com/en-us/library/gg328574.aspx#bkmk_sandboxplugin.
Limitations
This extension works best when you are developing against a local CRM server. The following commands will not work, or partially work, if you are not developing against a local CRM server:
- Deploy Assemblies to Bin Folder
- Deploy Assemblies to GAC
- Deploy Assembly to CRM Database – the assembly will be updated in the CRM database, but the debug file will not be copied to the CRM’s Bin folder.
- Attach to Async Service
- Attach to IIS
Download
You can download the extension from Visual Studio Gallery using this link.
Hi Bernado,
This is a great tool, thanks a lot for writing it, However, except for webpages, its not working after the latest upgrade (3.8). Below is the error, any help on this much appreciated.
Last error from CRM: ************ FaultException`1 – RetrieveMultiple : RetrieveMultiple to CRM via IOrganizationService |=> ‘adx_entityform’ entity doesn’t contain attribute with Name = ‘adx_websiteid’.
‘adx_entityform’ entity doesn’t contain attribute with Name = ‘adx_websiteid’. => ‘adx_entityform’ entity doesn’t contain attribute with Name = ‘adx_websiteid’.[TerminalFailure] Failed to Execute Command – RetrieveMultiple : RequestID=9f60ec12-aed8-41e4-a02b-56cf4d3a2f5c : RetrieveMultiple to CRM via IOrganizationService duration=00:00:00.1216353 ExceptionMessage = ‘adx_entityform’ entity doesn’t contain attribute with Name = ‘adx_websiteid’.
Hi Jacob, are you using onprem Portal version 7?
Hey Jacob, support for onprem Portal version 7 was dropped in version 3.8. This may be what’s causing the issue you described.
I have now added that support back and published a new version (3.8.1). Please update the extension the see how that goes.