This documentation is archived and is not being maintained.

Identifying Elements 

Visual Studio 2005

Applying identifying information to an IDE element in the policy definitions file associates that IDE element with one or more items in Solution Explorer and makes it possible to apply policy to those items in the policy actions file. As the host of applications that incorporate Enterprise Templates, Visual Studio must be able to recognize each valid IDE element that is defined in your policy definitions file. For this reason, the Policy Description Language (PDL) includes XML elements that you can use to provide a variety of information about the projects, code, project items, components, and so on, that you use in your application.

In the policy definitions file, you provide two kinds of identification for each IDE element:

  • the id is used to reference the IDE element from the policy actions file.

  • the identifiers are used to locate an element in the Visual Studio integrated development environment (IDE). An Identifiers element must appear within every IDE element definition in the policy definitions file, and must contain the appropriate child elements to identify that type of IDE element, for example, to identify an HTML element, you can use a Tag and an Attribute.

    NoteNote

    If an IDE element is not defined in the policy definitions file, policy cannot be applied to it in the policy actions file.

    NoteNote

    For an IDE element to be recognized, it must meet the identifying criteria specified in all identifiers within an Identifiers element. If there are multiple identifiers, the object must meet the requirements defined in each, otherwise it is not recognized. The policy author is responsible for choosing appropriate identifiers for each IDE element.

The following topics show how to use a variety of the types of identification available to you.

Defining an Id in the Policy Definitions File

How to: Identify Projects

How to: Identify Project Items

How to: Identify a User-Created Class

How to: Identify Code Variables

How to: Identify a Reference to a DLL

How to: Identify an HTML Item

NoteNote

When you reference a type or class, you must use a fully qualified name, including the namespace. For example, if you are referencing an AdRotator, the value to enter is:

System.Web.UI.WebControls.AdRotator
NoteNote

If a project does not compile, the identification might be incomplete or incorrect.

See Also

Show: