HOWTO: Set up your dev box to build StyleCop

Follow these steps to create a local copy of StyleCop sourcecode:
  • Ensure you've installed the necessary development tools
  • Click on the Source Code tab at the top of this page and follow the instructions located there to get a copy of the code on your machine. The exact instructions for this vary depending upon whether you use one of the various source control clients, or simply download the code in a ZIP file. (I recommend using TortoiseHg)
  • Using TortoiseHg:
  1. Create a new development folder i.e. c:\dev\stylecop-main
  2. Right click this folder and do TortoiseHg->Clone. Use http://stylecop.codeplex.com as the Source path and your new dev folder as the Destination path. Click Clone.
  3. This will take a few minutes to clone the repository to your local folder.
  • Right-click on your Windows Desktop and select New->Shortcut
  • In the target box that appears, fill in "%windir%\system32\cmd.exe /k {YourDevFolder}\main\project\environment.cmd" where {YourDevFolder} is the root location of the folder where you placed the StyleCop source code.
  • Click on this new shortcut to launch a StyleCop enlistment window. This should open up without errors.
  • From your cmd window run VerifyBuild.cmd. This should complete without errors.
  • In order to build/edit StyleCop properly in Visual Studio then Visual Studio must be launched from within this cmdwindow. From your cmd window type StyleCop.sln. This will launch Visual Studio and load the StyleCop solution.

Last edited Mar 13, 2011 at 11:09 PM by andyr, version 5