LINQPad Plugin for Sitecore Instance Manager

I consider LINQPad an essential part of my Sitecore toolkit. Earlier this year I wrote an article that explained how to use LINQPad with Sitecore

I don't think the configuration process is too tedious when I'm working on a single version of Sitecore for an extended period of time. But since Sitecore is now on a 6 week release cycle, I've found myself having to repeat the process more often than I used to.

In fact, I've found myself having to install Sitecore a lot more often than I used to. That led me to try out Sitecore Instance Manager, which is an amazing tool that I wish I'd made time to learn sooner. Over the past 2 weeks it has become a tool I use daily.

This post isn't about SIM or my development environment (though I plan to write articles on those topics in the future). Instead, it's about a SIM plugin I wrote to automate the process of configuring LINQPad to work with Sitecore as described in the my original LINQPad post.

The plugin provides tools for developers who are using LINQPad with Sitecore. The first release performs the humble task of generating the LINQPad.config file needed to use the Sitecore API with LINQPad.

Installing the Plugin

  1. Download the plugin config file (Plugin.xml) and assembly (SIM.Tool.Plugins.LinqpadTools.dll) from GitHub.
  2. Copy the files into a folder named Linqpad Tools in SIM's Plugins folder. On my machine the folder is located at C:\Program Files (x86)\Sitecore Instance Manager\Plugins\Linqpad Tools.
  3. Start SIM.
  4. Navigate to Tools > Plugins.
  5. Tick the box next to Plugins\Linqpad Tools.
  6. Click OK.
  7. Restart SIM.
  8. Navigate to Tools. You should see a LINQPad Config Generator button.

Using the Plugin

  1. Select the Sitecore instance you want to use to generate the config file. 
  2. This will enable the LINQPad Config Generator button. Click the button.
  3. A window will appear. The text in the window is the LINQPad.config file needed for the Sitecore instance you selected. Click the Save As button.
  4. Now you select the location where you want to save the file. The default location should be the correct location for the file. Don't worry if the file doesn't already exist! LINQPad doesn't require the file, but will use it if it's available.

Extending the Plugin

One of the main things the plugin does is modifies the web.config file Sitecore uses so it includes the right settings for LINQPad. I developed this plugin using Sitecore 7.1. But future or past versions of Sitecore may require additional web.config changes in order to work. For those changes you need to either change or add IConfigRepairer classes which are specified in the Plugin.xml file. I will cover this in a later post. 

For now I just wanted to point you in the right direction in case you need to make changes before I write the follow-up post.

The source code is available on GitHub in case you want to make any changes.

  • Hi Adam,  I've just tried your pluging with SIM 1.3 update 1 and it seems to crash every time on start up. When I remove the plugin it works fine. Is this a known issue?  Cheers Ben

  • It depends on which version of the plugin you're using. If you downloaded the plugin before 14 Jan, the plugin should work with SIM 1.3 update 1.   On 14 Jan I replaced the plugin with a version that works with SIM 1.3 update 2. But if you try to use the new plugin with update 1, SIM will crash.  In short, my recommendations are (in order): 1. Upgrade to SIM 1.3 update 2 and use the plugin currently available for download 2. Use whatever version of SIM you want, but download the plugin source code and recompile it using your version of SIM.  Hope this helps!