Getting the CRM 2013 SDK to work with Visual Studio 2013

At the moment I’m setting up a brand new development image. The image is based on Windows Server 2012R2, IIS, SQL Server 2013, CRM2013 and Visual Studio 2013.

Afterwards I installed the CRM 2013 SDK. Within the SDK folder structure there is a folder DeveloperToolKit. Inside this folder there are installers for Visual Studio 2008 and Visual Studio 2012. I decided to start the installer for Visual Studio 2012 (CrmDeveloperToolsV12 Installer.msi)

Installer location

After starting the installer I was confronted with the error message that Visual Studio 2012 was required. * aargh *

I did some research on the internet and found an article on hastagcrm.com which offered a solution for this problem. You have to do a couple of steps and after these steps the developer tools can be installed within Visual Studio 2013.

Extract the contents of CrmDeveloperToolsVS12_Installer.msi

  1. Open a Command Prompt as Administrator
  2. Navigate to: Tools\DeveloperToolkit\
  3. Run: msiexec /a  CrmDeveloperToolsVS12_Installer.msi /qb TARGETDIR=<EXTRACTFOLDER>where <EXTRACTFOLDER> is a path to a folder, in my case I used “C:\SDK\CRM2013\Tools\DeveloperToolkit\temp”.Extracting

Modify the VSIX package

  1. Navigate to the folder which you extracted the files
  2. Open the Visual Studio folder
  3. Open the archive file Microsoft.CrmDeveloperTools.vsix   (using 7-Zip or a similar tool)
  4. Copy the extension.vsixmanifest file to your desktop and leave the archive opened
  5. Edit extension.vsixmanifest
  6. Replace: InstalledByMsi=”true” with: InstalledByMsi=”false”
  7. Replace all instances of: Version=”[11.0,12.0)” with: Version=”[11.0,12.0]“   (note the closing bracket changed).
    The contents of the manifest will look as follows:Modify the manifest
  8. Save the manifest file and update the file in the archive by copying the file back to the archive.

Install the package

  1. Double click to install the VSIX package Microsoft.CrmDeveloperTools.vsixinstall2013
  2. Click Install.
  3. Installation completed

    2013installed

Almost done…
At this moment you can start Visual Studio 2013 and and you will see new project types in the list of project types (section Dynamics CRM).

Vs

However, when you go ahead and create a new project, you might get an ugly exception “Failed to get location of Visual Studio from registry”  (this will occur when you create a project of type Workflow library or Plug-in library).  I did some research again and found a very recent article on Chitrarasan’s blog.

In order to fix this problem, you need to do the registry modification as described below:


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&Prime
[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\\”


Download Registry Fix

Hopefully Microsoft will provide us with an update for the CRM 2013 SDK. In the meanwhile this is the way to get Visual Studio 2013 to work with the developer tools for CRM 2013.