Modern applications typically depend on a range of operating system features, installed frameworks, and other runtime and design-time components in order to install and operate correctly. For example, an application for Windows Azure may require specific versions of the .NET Framework, Microsoft Visual Studio, the Windows Azure Tools and SDK, and installed databases. Writing setup programs that check for all of the pre-requisites is a time-consuming and error-prone activity that most developers would wish to avoid!

Image1.png

The Dependency Checker utility from Microsoft's patterns and practices makes it easy to perform these kinds of pre-requisite checks, and makes it easier for users to install the required software and configuration settings. Users run the utility from a command file, and it displays a list of pre-requisites. When the user clicks the Scan button it displays the results of checking for the pre-requisites. For any not found to be installed, it shows what is required, how to install it, and (where appropriate) a link that will download and/or install the required software.

Special thanks to Developer Platform Evangelism for the original source code for Dependency Checker.

Dependency Checker Capabilities

The Dependency Checker can search for a wide range of settings or values that indicate if a required pre-requisite is installed or configured. These include:
  • Searching for Registry settings
  • Checking for specific software packages, hotfixes, databases, certificates, and files
  • Querying WMI and the user profile
  • Performing SQL queries
  • Checking for Web Platform Installer products
  • Evaluating custom expressions and executing arbitrary code
  • Evaluating dependencies in a pre-defined order

The Dependency Checker is configuration-driven, so updating the checks requires only editing the configuration file and does not require the Dependency Checker code to be updated (except for custom code-based checks). You can also extend it to meet project-specific requirements.

The Dependency Checker includes full source code and can be used and adapted under the license here.

Last edited Oct 29, 2011 at 12:14 AM by bennage, version 7