As part of my Developing in Sitecore series, this post is going to review how to get Sitecore Rocks connected to your Sitecore instance (and then how to add that reference to your project).
NOTE: If you are going to be developing on a local Sitecore instance you will want to run your Visual Studio as an administrator (elevated permissions). This is because when you’re creating the connection, Sitecore Rocks will attempt to publish a helper service (Hard Rock Web Service). This is completely optional, but when developing local (and you have the ability to do so) I recommend using the custom data provider (for reasons explained in the previously referenced link).
Establishing a Connection
To begin, we need to establish a connection to our instance. So, from the Sitecore menu in visual studio, select New Connection.
On the following screen, select your data provider (as mentioned before, I recommend the Hard Rock Web Service), specify the hostname of your instance (I’ll be reusing sitecore75 as I have throughout) and the path to your installation.
NOTE: If you don’t have direct access to the folder (or don’t care about the upgraded data provider) you can exempt the location. This also means you can ignore the two checkboxes at the bottom.
It’s a good idea to test your connection before accepting, but once you’re confident you have the correct details click OK. You should now see it show up in your Sitecore Explorer looking something like the following:
Connecting your Project
Now that we have a connection, it’s time to tie that connection with our solution. This is a very simple step and only involves right-clicking on your project and choosing Connect to Sitecore from the Sitecore context menu item.
In the dialog, select the connection you want to associate.
That’s it, you’re now connected. If you wanted to confirm your new connection, simply enable ‘Show all Files’ in your solution explorer and look for a new .sitecore file named after your project.
This file contains the information necessary for Sitecore Rocks to re-connect to your Sitecore instance.
NOTE: It’s up to you if you wanted to check this file into source control, but I tend to ignore it. Because it has no relevance on the project itself, I consider this similar to a .csproj.user file in that it is more for the local developer. (I’ve named my Sitecore instance Sitecore75, but another developer may have called it sc75r140806–for that reason alone I tend to let developers configure their setups independently.) Having said that, this means that anyone pulling the project down would need to establish this connection locally as a first step.
- Developing in Sitecore 7.5 — Setup and Installation
- Developing in Sitecore 7.5 — Solution Setup
- Developing in Sitecore 7.5 — Adding Sitecore Rocks