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
-
Select the default
(Full) Microsoft Visual C# 2008 Express installation.
-
If you installed Visual
C# 2008 Express in the default location, skip this step. Otherwise:
-
Create the System
environment variable
VSINSTALLDIR.
-
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.
-
Open a Visual Studio
2008 command prompt from the Windows Start Menu as follows:
-
Navigate to the
SDK\samples\DotNet
sub‐directory.
-
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.