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.

13 thoughts on “Getting the CRM 2013 SDK to work with Visual Studio 2013

  1. Santosh says:

    I have installed Developer toolkit for VS 2013 with the instructions but when I create CRM package and try to add a jScript under webresources I don’t see any project item in Add Item dialogue.

    Please help!

    • Hi Santosh

      can you send me some screenshots of the things you are doing? As far as I understand you are doing 2 things:

      1. you installed the developer toolkit for visual studio
      2. you tried to add a jscript under webresources.

      are those web resources inside your visual studio project? or are those web resources in the solution manager within CRM?

      Bas

    • media says:

      hi Santosh
      I don’t see any project item in Add Item dialogue too. Did you find any solution for your problem??
      because i have the problem exactly
      thanks

  2. media says:

    hi
    thanks for the guidline. but after authentication log on and choos the “organization” and “Solution” and press the “ok” button. I force to this error:

    the imported project “c:\program files\MSBuild\microsoft\CRM\microsoft.CrmDeveloperTools.12.targets” was not found. Confirm that the path in the declaration is correct , and that file exist on disk.
    C:\Usersmedia.aminian\AppData\Local\Temp\dga1bjat.gbm\Temp\crmPackagecsproj

    • Hi,

      can you reproduce all steps you did in order to get this error? I’ve never seen this before

      Bas

      • media says:

        i solved this proble by copying folder “MS Build” in the mail folder and i can create a new “crm package” project.
        bu now, when i want to “Add new Item”, there is no item in “add new item window”. how can i resolve this problem??

  3. media says:

    I have installed Developer toolkit for VS 2013 with the instructions but when I create CRM package and try to add a jScript under webresources I don’t see any project item in Add Item dialogue.

    Please help!

  4. ML says:

    Thanks, this worked for me. I didn’t need to use the registry modification fix as I didn’t face the issue.

  5. Seamus says:

    Thanks for this – very helpful in avoiding having to revert to VS 2012. However, just after I select the org and solution from my connection dialogue ‘Creating project ‘CrmPackage’…flashes up and overlaid is the error
    “System.Exception: General exception (Exception from from HRESULT:0x80131500) at EnvDTE100.Solution4.AddfromTemplate(String FileName, String Destination, String ProjectName, Boolean Exclusive) at MicrosoftCRMDeveloperTools.TemplateExtensions.CRMTemplateExtension.RunFinished()”.
    Would you have any idea how to resolve this? Many thanks.

  6. Kashif says:

    Guys, will dynamic CRM SDK 2013 work with visual studio ultimate 2013 version? As i installed but didn’t find option dynamic CRM -> New Project -> Visual Studio Ultimate 2013.
    Thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *