标签:
Recently I have been starting to learn Microsoft Dynamics CRM 2011 about implement plugin and workflow with SDK. The first thing I face is how to set up a development environment for Visual Studio. If you are using Visual Studio 2012 or lower version, it is very easy to setup SDK integrated with it. But actually, I am using Visual Studio 2013.
First thing is to download Dynamics CRM 2011 SDK in here: https://www.microsoft.com/en-us/download/details.aspx?id=24004. And then I should install SDK to VS2013. The installers are in Tools\DeveloperToolkit in SDK package only including two installers, ‘CrmDeveloperTools_Installer.msi’ and ‘CrmDeveloperToolsVS12_Installer.msi’. When I tried to run CrmDeveloperToolsVS12_Installer.msi that supports VS2012 in my local computer, one error tip was showed to tell me that current installer doesn’t support VS2013……. It is really shit. But whatever some reasons Microsoft has to think about, I believe that there should be someone who was already solved the problem. Finally I got the answer from http://community.dynamics.com/crm/b/tsgrdcrmblog/archive/2014/08/23/microsoft-dynamics-crm-2013-toolkit-with-visual-studio-2013. But from the author‘s topic, I knew that he wanted to install Dynamics CRM 2013 SDK to VS2013 and mine is Dynamics CRM 2011 SDK. There is a little difference from my expectation. But I decided to try it on Dynamics CRM 2011 SDK.
1. Navigate to folder in which file‘CrmDeveloperTools_Installer.msi’in cmd
2. Because I cann’t install this msi file and according the information that I am aware of, there is no better way to extract msi except using msiexec. So I executed the command:
C:\CRM-SDK\sdk\tools\DeveloperToolkit\CrmDeveloperTools_Installer.msi /qb TARGETDIR=C:\CRM-SDK\Toolkit
3. Navigate to the folder which I extracted the files. Open the Visual Studio folder and find file “Microsoft.CrmDeveloperTools.vsix”
4. Modify the extension of Microsoft.CrmDeveloperTools.vsix with .zip in order to extract it.
5. Extract it and find file “extension.vsixmanifest” in the folder. Open it and replace InstalledByMsi="true" with InstalledByMsi="false". Then find all instance all instances of - Version=”[11.0,12.0)” with: Version=”[11.0,12.0]”
6. Save it and repackage it. Run this file Microsoft.CrmDeveloperTools.vsix. It should be working.
7. Copy the files in CRM MSBUILD folder from \CRM MSBUILD folder to Program Files (x86)\MSBUILD\Microsoft\CRM. If Program Files (x86)\MSBUILD\Microsoft\CRM doesn’t exist. One should be created.
8. Create a registry file with the following details in
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\\"
and don’t forget check all folder paths in the registry file and change them accordingly.
So far, SDK is installed to VS2013 completely. What I should do next is to copy xml schemas files to Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas\.
1. Navigator to folder Schemas in SDK package.
2. Copy all xsd files into Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas\
When you edit xml which is from Dynamics CRM solution in VS2013, the intellsense will work to give your convenience.
How to set up Dynamics CRM 2011 development environment
标签:
原文地址:http://www.cnblogs.com/delexios/p/5148536.html