This project is read-only.

Getting the source code

Source code of all components offered on is maintained in a Mercurial repository. You need to install a Mercurial client to clone the repository. We recommend TortoiseHg. All further examples assume you installed TortoiseHg as your Mercurial client.

After installing TortoiseHg, open a command line window, go to the desired location on your disk (e.g. c:\projects), and issue this command:

hg clone

This will create a “wcf” subdirectory containing the source code of the all projects on

Directory structure

This is the location of key components in the source directory structure of

  • WCFjQuery – WCF for jQuery component that facilitates exposing JavaScript-friendly WCF endpoints with support for web-friendly data formats (code, unit tests, and samples).
  • HTTP – Components that facilitate creation of WCF services with a first class support for HTTP protocol.
  • lib – external components required to compile the code; each component usually comes with its own license.
  • common – project system artifacts common to all buildable components (FxCop and StyleCop rule sets).
  • build – location of binary components after a build.

Software requirements for building the sources

The recommended software for building projects on is:

Building the product

All projects are based on MSBuild project system, and can be built from the command line using msbuild.exe or from the Visual Studio 2010 environment. The two key components (WCFjQuery and HTTP) have separate solution files and can be built individually. To build all components from the command line, open the Visual Studio Command Prompt (2010) command line window and build the projects using the following commands:

cd c:\projects\wcf
msbuild wcfjquery\wcfjquery.sln
msbuild http\http.sln

The same build result can be achieved by opening and building the three solution files from Visual Studio 2010 IDE.

Building the three components creates the following key artifacts (all under the “build” directory):

  • Microsoft.Runtime.Serialization.Json.dll – .NET Framework version of the System.Json Silverlight components, with enhancements
  • Microsoft.ServiceModel.Web.jQuery.dll – WCF components that integrate System.Json components with the WCF programming model and enable authoring of web friendly WCF services than can be called directly from JavaScript clients, in particular jQuery
  • Microsoft.Http.dll – {Glenn}
  • Microsoft.Http.Extensions.dll – {Glenn}
  • Microsoft.ServiceModel.Http.dll – {Glenn}

In addition to the key libraries above, built components include tests and samples.

Running unit tests

Each of the three major components includes unit tests. The best way to run them is from the Visual Studio 2010 IDE.

The WCFjQuery.sln solution has two types of unit tests: unit tests for server components based on MSTest, and Ajax tests that exercise communication between a WCF service and JavaScript (jQuery) web client, based on QUnit:

  • To run the server side unit tests, open the WCFjQuery.sln solution in Visual Studio 2010, then choose Test|Run|All Tests in Solution.
  • To run the Ajax end to end tests, pen the WCFjQuery.sln solution in Visual Studio 2010, navigate to the Microsoft.ServiceModel.Web.jQuery.E2ETest project in the solution, then right click on the selected *.htm file in the AjaxTests directory, and choose “View in browser”.

To run unit tests for the HTTP.sln solution, open the solution file in Visual Studio 2010, then choose Test|Run|All Tests in Solution.

Last edited Oct 26, 2010 at 7:53 AM by tjanczuk, version 6


No comments yet.