Start Your Engines
By the end of this article you will have a working development environment with all the core tools required to extended the functionality of Dynamics CRM.
Before we get started it is important to highlight some of the fundamental approaches to CRM Development. Microsoft Dynamics CRM is full of features and capabilities that should be utilized in the first instance, simply put, we don’t go and try to re-invent the wheel when we can leverage stuff already out of the box (OOB). There are a host of reasons for why we take that approach and something to talk about in a separate article.
This is not uncommon, the truth is there are so many features within Dynamics CRM and typically (at least) two significant updates every year to the product that it is easy, even for experienced CRM developers to accidentally create some level of customisation that already exists within the platform. Not only does Dynamics CRM have one of the steepest learning curves but is constantly being improved, therefore keeping yourself up to date with each release should be high on your priority list.
Ok, generally when we talk about customising Microsoft Dynamics CRM it falls within two main categories:
- Customisation and Configuration (aka. Out of the box)
- Extending CRM (Development of Plugins, Custom Activity Workflows, Client and server side API’s, System Integrations)
This article is concerned with the latter and for that you will need to not only build a development environment but also download and configure a number of different tools.
Anatomy of a CRM Development Machine
So what would a typical development machine contain?
- Windows 10 Pro
- Visual Studio 2015 (or earlier)
- CRM Developer Toolkit (How to get CRM Developer Toolkit working with Visual Studio 2013 this also covers 2012 and 2015 versions of Visual studio)
- XRM Toolbox
- .NET Frameworks
- Internet Explorer 11
- Google Chrome (often quicker and easier than IE! – what the hell?)
- Notepad ++
Depending on requirements you may even take it a step further and have CRM Dynamics 2016 running locally on your machine (On Premise) along with SQL Server 2014. That may seem like a crazy idea for a “thin client” but thanks to Virtualization technology we are able to do this and actually most of my development environments are virtualised running on a laptop without any kind of performance issue. In a commercial environment where we have multiple developers, the dev tools are on a shared virtual machine server. I will write a separate article on how to setup Virtualised development environments along with the pro’s and con’s of such an approach at some point.
Getting Things Setup
If only it was simple, it really isn’t, especially when you are new to extending CRM, get ready for lots of frustrated hours.However this guide should if followed precisely help to reduce your cortisol levels. The order in which you install software is important to avoid compatibility issues so below is how you should set things up:
- Install Microsoft Visual Studio (if running multiple start with the older ones first)
- Enable Windows Identity Foundation (WIF)
- Download .NET 4.5.2 developer pack (needed for CRM 2016)
- Download Microsoft Dynamics CRM 2016 SDK
- CRM Developer Toolkit
- XRM Toolbox
Install Visual Studio
The nice people at Microsoft allow us to use Visual Studio 2015 Community edition for free so long as it’s for learning and non commercial purposes which is great grab yours (Download Visual Studio Community Free Version) or if using this at work grab yourself the Professional edition from your corporate MSDN subscription. The installation is really straightforward you can pretty much use all the default settings so there isn’t much more to say on this area.
Enable Windows Identity Foundation
This is usually located within Programs and Features (Depends what Operating System you are running) and is needed primarily for the CRM Developer Toolkit to place nicely along with XRMToolbox plus other 3rd party tools.
If WIF not listed here you will probably need to use Powershell to install the feature (Add-WindowsFeature windows-identity-foundation), or if running a really old operating system will need to download the installation from Microsoft.
Get .NET Developer Pack
So I like easy, the easiest way to grab it is to fire off Visual Studio, go to new->Projects then select the option as shown here:
This will open up your browser and the one you need to download is shown here:
Microsoft Dynamics CRM 2016 SDK
It could be that you are targeting and older version of Microsoft Dynamics CRM perhaps 2015, 2013, 2011 or God forbid 4.0! That’s ok, it’s important in my view to always be forward looking so being setup for the current version is always a good thing. The .NET libraries are cumulative so if you find that you need to use an older version of the framework simply Target the appropriate version that CRM was built upon from within the project Target Framework pick-list (or combo control if being technical). Grab the latest CRM 2016 SDK or if targeting an older version of CRM get the latest SDK for that version.
CRM Developer Toolkit
You might be thinking why? Well let me explain. If you have not used this before you are really missing out this includes those developers who have be extending CRM since God was a lad.
The CRM developer toolkit enables you to:
- Browse the CRM Solution/Entities without having to leave Visual Studio
- Maintain all CRM code in one central place for development work
- Maintain references to all Assemblies (custom and 3rd party)
- Provide Early Binding across all your project types from one visual studio solution
- Enhances rapid development and productivity in developer teams (IMHO)
Then providing you are checking in code to a shared repository (TFS, Subversion etc), it makes work much easier when you have multiple developers all working on a CRM implementation. This unfortunately is a bugger to install with any version of Visual Studio after the 2012 edition .. but lucky for you I have wrote a guide on How to install the CRM developer toolkit with Visual Studio 2015.
XRM Toolbox and Other CRM Tools
As I mentioned at the start of the article the story does not end with Visual Studio. There are a number of tools you will need to have in your utility belt including:
- XRM Toolbox (Tools the most commonly used purpose is for Sitemap/Iconator/MetaData)
- SvcUtilFilter (A free visual studio solution that creates early binding classes automatically)
- Ribbon Workbench (CRM solution file that makes it easier to customise the application ribbon simply install within your dev CRM enviornment)
XrmToolBox is an application that can connect to Microsoft Dynamics CRM 2011, 2013, 2015 and 2016 (Online, OnPremise of IFD). It is shipped with more than 20 plugins to handle several administration, customisation or configuration tasks. One of the great points about XrmToolBox is its capability to welcome external plugins written by other developers, just by implementing specific part of XrmToolBox code. https://github.com/MscrmTools/XrmToolBox
Requires: .NET 4.5.2 and WIF
Grab yourself the 2016 version
Featured Image: shehan365 via photopin.com, creative license.