Yesterday I wrote Where is the CRM Developer toolkit for CRM 2015? and for the past couple of nights I have been wrestling with Visual Studio Community 2013 and the CRM Developer toolkit trying to get them to place nicely with each other.
Visual Studio Community 2013 is awesome
It’s a Windows 8 laptop and thought I would install the Visual Studio Community 2013 edition of Visual Studio. So far it’s awesome and means I can have a fully working copy of Visual studio on home computer (which is good and a bit sad at the same time :-))
Microsoft have been awesome and the Visual Studio Community 2013 is a free to individual developers, download and see what’s there in the link below
The page answers a good question, which I have copied below
Q: Who can use Visual Studio Community?
A: Here’s how individual developers can use Visual Studio Community:
- Any individual developer can use Visual Studio Community to create their own free or paid apps.Here’s how Visual Studio Community can be used in organizations:
- An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects.
- For all other usage scenarios: In non-enterprise organizations, up to 5 users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or > $1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.
Q: How does Visual Studio Community 2013 compare to other Visual Studio editions?
A: Visual Studio Community 2013 includes all the great functionality of Visual Studio Professional 2013, designed and optimized for individual developers, students, open source contributors, and small teams.
Getting the CRM Developer toolkit working
I had avoided the pain of hacking, nudging, shouting and in the end forcing Visual Studio 2013 to work with the CRM developer toolkit. I had read about it and it didn’t sound like fun.
It has taken a few hours of getting it to work and has taken a lot of mucking about (technical term).
I thought I would blog down my experiences to help other CRM developers who have to go through this.
The main instructions are in this great blog post from Simon Jenkinson, it’s fortunate he blogged this because the initial blog Hashtagcrm.com no longer works😦
These are the instructions I have copied from the blog above
1. Extract the contents of CrmDeveloperToolsVS12_Installer.msi
2. Open a Command Prompt
3. Navigate to the extracted SDK folder e.g. C:\CRM-SDK\sdk\Tools\DeveloperToolkit\
4. Execute the command msiexec /a C:\CRM-SDK\sdk\tools\DeveloperToolkit\sdkCrmDeveloperToolsVS12_Installer.msi /qb TARGETDIR=C:\CRM-SDK\Toolkit
5. Navigate to the folder which you extracted the files
6. Open the Visual Studio folder
7. Open the archive file Microsoft.CrmDeveloperTools.vsix, or extract it to a sensible location
8. Then we need to edit the extension.vsixmanifest, and replace – InstalledByMsi=”true” with InstalledByMsi=”false”
9. We also need to replace all instances of – Version=”[11.0,12.0)” with: Version=”[11.0,12.0]“ (notice the closing bracket has been changed from ) to ] )
10. Update the manifest file in the archive or repackage the extracted directory.
The instructions work but there is a couple of tricky bits
Step 4 – Tricky bit
Execute the command msiexec /a C:\CRM-SDK\sdk\tools\DeveloperToolkit\sdkCrmDeveloperToolsVS12_Installer.msi /qb TARGETDIR=C:\CRM-SDK\Toolkit
You have to make sure the target directory already exists or it won’t work, this stopped me for a while because the error message doesn’t say much.
Step 7 – Tricky bit
Step 7 – Open the archive file Microsoft.CrmDeveloperTools.vsix, or extract it to a sensible location
I could get this to work for quite a while. The main problem I had was if I extracted the Microsoft.CrmDeveloperTools.vsix, this created a folder Microsoft.CrmDeveloperTools, I then edited extension.vsixmanifest to change the ) to ] and change InstalledByMsi=”false” but then I couldn’t figure out how to re-zip or get it back to being the vsix.
In the end I found the solution was to edit the files inside the files inside the Microsoft.CrmDeveloperTools.vsix.
I will admit I didn’t really know what a vsix file was
The VSIX file is the unit of deployment for a Visual Studio 2010 Extension. Visual Studio will recognize the VSIX extension and install the contents of the file to the right location.
A VSIX file is a zip file that uses the Open Packaging Convention. You can rename the .VSIX extension to .ZIP and use any zip browser (including the Windows File Explorer) to browse its contents.
So it’s basically a zip file which holds visual studio extensions, this is good because it means you can edit the contents like this and I guess you could re zip them and then rename to VSIX but I found editing inside the vsix easier.
Once you have changed the values you should be able to double click the VSIX and it will install.
The next stage was to copy the folder CRM MSBuild which has the files below in
I had to copy this folder to this directory and rename CRM MSBUILD to CRM
C:\Program Files (x86)\MSBuild\Microsoft
so you should have this
C:\Program Files (x86)\MSBuild\Microsoft\CRM
In this folder you should have the four files mentioned above.
The last tricky part was changing some reg files, I had some problems with this and it turned out I needed the line
Windows Registry Editor Version 5.00
at the top of the reg file edits, who knew. The text are in the link below
I did have to install Windows Identity Foundation or rather you enable it in Windows 8, instructions here
It certainly wasn’t straight forward getting this working. I am really grateful for Simon to blogging about it and giving some clear instructions and I hope this blog augments those to help people get over a few tricky humps.