Build Sample Code with
Visual C# 2008 ExpressLast Updated January 23, 2025
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.
- 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 variableVSINSTALLDIR.
- Set theVSINSTALLDIRenvironment variable to the location of the Microsoft Visual Studio tools, in theCommon7sub‐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 folderC:\Program Files\Microsoft Visual Studio 9.0, you do not need to create or set theVSINSTALLDIRenvironment variable.
- Open a Visual Studio 2008 command prompt from the Windows Start Menu as follows:
- Navigate to theSDK\samples\DotNetsub‐directory.
- At the command prompt, typeBuild2008.cmdto 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\binor\debugdirectory 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.