You can build C# .NET samples using Microsoft Visual C# 2008 Express or Microsoft Visual Studio 2008. If you have a later version of Visual Studio, it might ask to convert the solution and project files before proceeding.

Procedure

  1. Select the default (Full) Microsoft Visual C# 2008 Express installation.
  2. If you installed Visual C# 2008 Express in the default location, skip this step. Otherwise:
    1. Create the System environment variable VSINSTALLDIR.
    2. Set the VSINSTALLDIR environment variable to the location of the Microsoft Visual Studio tools, in the Common7 sub‐directory of the Microsoft Visual C# 2008 Express installation. Default locations are shown below. Use quotation marks around directory names that contain spaces, as these do.

      C:\Program Files\Microsoft Visual Studio 9.0\Common7"

      C:\apps\Microsoft Visual Studio 9.0\Common7

      If Visual C# Express is installed in its default folder C:\Program Files\Microsoft Visual Studio 9.0, you do not need to create or set the VSINSTALLDIR environment variable.

  3. Open a Visual Studio 2008 command prompt from the Windows Start Menu as follows: Start > Programs > Visual Studio 2008 > Visual Studio Tools > Command Prompt
  4. Navigate to the SDK\samples\DotNet sub‐directory.
  5. At the command prompt, type Build2008.cmd to execute the build commands.
    The build process generates the RecoveryPlan sample program, which lists all recovery plans and optionally gets state for the specified recovery plan. A sample build can be executed from the \bin or \debug directory of a project. You can also run samples from within Visual Studio, at the .NET command prompt. To display help text for any application, you can run the application without any parameters.