Setting up S#arp Architecture 1.6 for VS 2008

Published on 11 July 2011

The latest S#arp architecure is 1.9 something, rapidly heading towards 2.0, and all targeted at VS2010.

But if you're using VS 2008, you'll have to use S#arp Architecture v1.6, which was the last version targeting VS 2008. But its best to use Templify to setup your solution, which is something they built especially for S#arp 2.0 but now has a retrofitted template for 1.6.

(NB: setup instructions for the latest S#arp seem to be in their wiki, here)

So, here's the steps to get S#arp 1.6 working from a vanilla Visual Studio 2008 install:

  • Install MVC 2

  • Install .NET Framework 4 (not needed for S#arp 1.6, but is needed for Templify)

  • Install T4Toolbox

  • Install Templify

  • Download sharp-architecture-1.6.0.0-templify-package.zip from the S#arp github site

  • Unzip the package and run copy-package.cmd to copy the Templify template to the right place

  • Make a folder somewhere

  • Right click on the folder and select 'Templify Here'

  • Select the "SharpArchitecure VS 2008 MVC 2 1.6.0.0" template

  • Enter your project name

  • Press Deploy Template

... and voila, you have a VS 2008 S#arp 1.6 solution.

To get the initial test running, you also need to create a blank database and edit (project).Web/NHibernate.config.xml to point to that db.

Most of the templify stuff, and generation of code using the CrudScaffolding is covered by the S#arp documentation for VS 2010