Monday 29 December 2008

Installing ClearCanvas SDK with VS2008 C# Express Edition

I have struggled for a while now to get the ClearCanvas SDK on my machine. I am not too great with Visual Studio as I am mostly a novice when it comes to Visual C#. I finally managed to get the templates to work on my machine though. This is how I did it:

  1. Download & Install Visual C#2008 Express Edition 
    http://www.microsoft.com/express/download/
  2. Download & Install ClearCanvas SDK 1.3
    http://www.clearcanvas.ca/dnn/Downloads/tabid/70/Default.aspx
  3. Take note of the path ClearCanvas spits up with it error regarding the Global Assembly Cache. (C:\Program Files\ClearCanvas\SDK\1.3\bin\vswizards\ClearCanvas.VSWizards.dll)
  4. Register the wizards in the Global Assembly Cache:
    - Find the gacutil.exe file on your computer. (C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin)
    - Open command line and go to this directory.
    - run the command below (use the path as shown in the error message.)
    gacutil.exe /i "C:\Program Files\ClearCanvas\SDK\1.3\bin\vswizards\ClearCanvas.VSWizards.dll"
  5. Install the visual studio templates:
    - Find the template files in the following folders:
         C:\Program Files\ClearCanvas\SDK\1.3\bin\vstemplates\project_templates\
         C:\Program Files\ClearCanvas\SDK\1.3\bin\vstemplates\item_templates\
    - Copy the template files to the following folders:
         C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress\ItemTemplates\1033
    C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress\ProjectTemplates\1033
    - Now register the templates by running the following command at command line:
      "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress.exe" /setup
  6. You should now be able to open up Visual Studio 2008 Express Edition and see the ClearCanvas Project Templates as well as Item Templates.