Building the Code of ClearCanvas

Building the Code

Requirements

To build the code, you will need either Visual Studio (2008 or later), or the free Visual Studio Express Editions (2008 or later). Please note that we only keep one version of the Visual Studio solutions in the source tree. If your version of Visual Studio is different from the version listed for your source code (see table above), then you will have to convert the solution and project files.

Visual Studio Express Edition Users

A number of the included libraries are built in Visual C++. As such, you may find that you also need to install the Visual C++ Redistributable (the version you need is the Visual Studio Version for your source code listed in the table above). If you are using 2010 Beta 2, you should still download and install the version for the source code you downloaded, unless you intend on rebuilding all referenced binaries in the source tree.

Visual Studio 2005 Users (All Editions)

This version of VS shipped with .NET Framework 2.0. You will need to install .NET Framework 3.0 .

Building the ImageViewer Code

  1. Open ImageViewer.sln in /Trunk/ImageViewer in Visual Studio and build it
  2. Set the startup project to ClearCanvas.Desktop.Executable

Building the ImageServer Code

The ImageServer code is composed of a single Windows Service (ClearCanvas.ImageServer.ShredHostService.exe) and an ASP.NET 2.0 based Web GUI.

To build the ImageServer+WebStation, both Visual Studio 2008 and Visual Studio 2010 are required. The core ImageServer is built with Visual Studio 2008, and the Silverlight component is built with Visual Studio 2010. The solution file must be loaded with Visual Studio 2008. As part of the build, the solution file will use Visual Studio 2010 to build just the Silverlight component.

Additional Prerequisites

In addition to the base requirements listed above, you will need the following:

  1. Install Visual Studio (Note: Visual C# Express Edition can be used for development of the Windows service, but not for development of the Web GUI.)
  2. Install ASP.NET AJAX 1.0
  3. Install Microsoft Web Deployment Projects for use with the ImageServerWeb.sln file.
  4. Install Silverlight 4 Control Toolkit for building the ImageServer+WebStation.
  5. Install ImageServer. This will create the database required to run the server. (Another option is to run the database creation scripts manually for the database. They can be found in the folder svn://svn.clearcanvas.ca/source/Xian/Trunk/ImageServer/Model/SqlServer2005/Scripts . The database creation script must be run first, followed by the table creation script and then the stored procedure and default data scripts.)

Building and debugging the Windows service

  1. Locate ImageServer.sln in /Trunk/ImageServer
  2. Open it in Visual Studio.
  3. Change the connectionStrings in the ImageServer_Shreds_dist.config in the solution files Solution Items folder to use the user and password that were used to install the ImageServer.
  4. Edit /Trunk/ImageServer/Executable/Logging.config to contain the database connection information.
  5. Build the solution.
  6. Startup ClearCanvas.ImageServer.ShredHostService to run the server in a command line window.

Building the web GUI code

  1. Locate ImageServerWeb.sln in /Trunk/ImageServer/Web .
  2. Open it in Visual Studio.
  3. Change the connectionStrings in the Web.config of the ClearCanvas.ImageServer.Web.Application project to use the user and password that were used to install the ImageServer.
  4. Edit Trunk/ImageServer/Web/Application/Logging.config to contain the database connection information.
  5. Build the solution.
  6. Startup the ClearCanvas.ImageServer.Web.Application project to view the Web GUI.
  7. Note that the ClearCanvas.ImageServer.Web.Application project to view the Web GUI is also contained in the ImageServer.sln solution file and can be run from there as a convenience to make development work easier.

A Few Notes About SVN (aka Read This If You're A SourceSafe User)

For those of you who have used SourceSafe or other similar SCM systems, you'll find the SVN SCM model to be slightly different. You'd do well to read some of the introductory documentation that comes with TortoiseSVN. If you're lazy, here are a few notable differences:

  • Checking Out the code is more or less equivalent to performing SourceSafe's Get Latest Version on an empty working directory.
  • Once you've checked out the code, you'll never have to do it again, unless you want your working copy somewhere else.
  • Unlike SourceSafe, when you get a fresh copy of the code from the repository, your working copy isn't read-only.
  • There is no concept of checking out a file before editing it. Since your copy isn't read-only, you can edit your working copy however you want.
  • When you've made changes to your working copy, you Commit your changes. This is substantively equivalent to SourceSafe's Check In . If another person has committed changes before you, you will need to merge the changes into your working copy, then commit them again.
  • A commit (or any change in the source tree), no matter how small, results in the entire source tree's revision number being incremented by 1. It is possible to retrieve the exact state of the tree at any given revision number.
  • Multiple changes can be committed as a single Changeset . That is, if you've edited a number of files and you commit them all at once as a set, that will result in the revision number of the source tree being incremented by only 1. Related to this is the feature that all commits are atomic. It's impossible for a changeset to be partially committed. It's either all in or not in at all.
  • Updating a file or directory will Get Latest Version of that file or directory

你可能感兴趣的:(Web,SVN,asp.net,asp,silverlight)