Update: 03/10/2019

I’ve not used the developer toolkit since writing this post but it seems Microsoft have since updated it on 18 July 2017. According to the latest version it appears that it may work now with VS 2013 and 2015 which makes my post here probably not relevant anymore. I’ve not yet tried to get this working however on Visual Studio 2017 or 2019, it could be that some of the steps outlined in this article will get it to work on those versions too. If I get time will do a shorter article on it and link back to this one.

Developer Toolkit is it worth it?

I’m starting to think not! The Microsoft development team don’t seem to consider this a priority, despite lots of developers loving the tool because it is a massive productivity saver. It is unlikely given they have not updated it since July 2017 that it will get another update to target Visual Studio 2017/2019 etc.

Guessing you are here because you want to know how to get CRM Developer Toolkit working with Visual Studio 2013 and possibly 2015? The good news is that by following these instructions it will also work with Visual Studio 2015, 2013 and 2012.

I have successfully managed to also have all three versions of Visual Studio working on the same development machine with the CRM developer toolkit extension working across each of them. The reason we are in this pickle in the first place, is that Microsoft had no plans to release updated extensions past CRM SDK 2013/VS2012. However rumors are circulating that Microsoft plan to release an updated CRM developer toolkit at some point in 2016 saving us all much hassle!

In the meantime:

Prerequisites

1. Install Visual Studio 2012, then 2013 and 2015+ (assuming you need more than one version running on your development machine!)

2. Ensure all relevant .NET frameworks installed  and. the .NET 4.5.2 developer pack Visual Studio installs mostly take care of this with exception to developer pack which you can download from the Project window

3. Enable Windows Identity Foundation (on Win2012 Server do this in powershell > Add-WindowsFeature windows-identity-foundation)

4. Ensure each version of Visual Studio has installed and opens without error

5. Download CRM2013 SDK and within the Tools folder the Developer Toolkit should be present.

Configure CRM Toolkit Extension

Firstly, I don’t know if there is a way to get the toolkit to install all from one VSIX file? If you do let me know? Struggled with this as it seems that the installer will only accept two versions of visual studio as opposed to three.

To get around it I customised the VSIX to work with Visual Studio versions 2012 and 2013. After that, created a separate VSIX file specifically for 2015.

When Visual Studio 2016 is released I imagine the process will be much the same just ensuring the right versions are specified (See point 8 below).

1. Create a folder to hold files that we are about to extract from CRM toolkit (e.g. C:\CRMToolkitExtract)

2. Open CMD and navigate to C:\DeveloperToolkit (where I have the default MSI files for CRM2013 version of toolkit)

3. In command prompt run

msiexec /a C:\DeveloperToolkit\CrmDeveloperToolsVS12_Installer.msi /qb TARGETDIR=C:\CRMToolkitExtract

4. In windows explorer Open the Visual Studio folder

5. Rename Microsoft.CrmDeveloperTools.vsix to zip then browse (or you edit directly if using a tool like 7-Zip on your machine)

6. Then we need to edit the extension.vsixmanifest (within zip file)

7. Replace InstalledByMsi=”true” with InstalledByMsi=”false”

8. Replace Version=”[11.0,12.0)” with “[11.0,12.0]” – this being VS2012 and VS2013

or

8. Replace Version=”[11.0,12.0)” with “[12.0,14.0]” – this being VS2013 and VS2015

9. Save extension.vsixmanifest somewhere then copy back into zip archive and overwrite

10. Rename Microsoft.CrmDeveloperTools.zip back to Microsoft.CrmDeveloperTools.vsix or in my case I had two of these:

Microsoft.CrmDeveloperToolsVS2012and2013.vsix

Microsoft.CrmDeveloperToolsVS2013and2015.vsix

Each of the above had the extension.vsixmanifest file configured as required. You can pick as part of the installation of the VSIX whether to update a specific version of Visual Studio or all of them

11. Now create a text file and place these registry values in it:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\BuildNumber]
“1033”=”12.0″
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\Pro]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\VSTD]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”

This worked fine for me with Visual Studio 2012 and 2013 however unsure if the issue was related or not but had issues with 2015. I ran the following registry update which is similar to above but has more environmental settings then everything worked across all product versions:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”
“MSMDir”=”C:\\Program Files (x86)\\Common Files\\Merge Modules\\”
“VS7EnvironmentLocation”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\devenv.exe”
“EnvironmentPath”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\devenv.exe”
“EnvironmentDirectory”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\”
“VS7CommonDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\”
“VS7CommonBinDir”=””
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\BuildNumber]
“1033”=”12.0″
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\Pro]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS\VSTD]
“ProductDir”=”C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\”

12. Save the file as VSToolkit.reg

13. Double click the VSToolkit.reg file to open and update registry settings

14. Now run Microsoft.CrmDeveloperTools.vsix from within the extracted folder (i.e. the file modified above) to install toolkit

15. The following is crucial for the developer toolkit to place nice within Visual Studio..

Navigate to the root folder C:\CRMToolkitExtract and you will see a folder called CRM MSBuild, copy this folder into program files *C:\Program Files (x86)\MSBuild\Microsoft\* and rename folder CRM MSBUILD to CRM

It is very important that you do this after running VSIX or any other Visual Studio installation/upgrade as sometimes the folder is deleted which will cause different but similar errors across each version of VS installed.

16. Start Visual Studio, you should now see a Dynamics CRM project file option under projects. This should be the case across all VS installs you have on the machine.

17. Verify you can connect to CRM without errors (as it is only at this point that VS attempts to read the template files and create the CRM solution). I tested this and it worked with versions of Dynamics CRM 2011, 2013, 2015 and 2016.

Conclusion

It was not the simplest of tasks to get this working across the latest versions of Visual Studio but had a (little!) help from the following:

Hosks

https://crmbusiness.wordpress.com/2015/06/05/getting-the-crm-developer-toolkit-working-with-visual-studio-2013/

CRM Community

https://community.dynamics.com/crm/b/tsgrdcrmblog/archive/2014/08/23/microsoft-dynamics-crm-2013-toolkit-with-visual-studio-2013

There are other possible alternatives to the Microsoft CRM Developer Toolkit, none of which I have yet played with but if you have any thoughts on these tools or experience using them please post below and share knowledge.

https://crmbusiness.wordpress.com/2015/06/10/crm-developer-toolkit-alternatives/