DeploymentItemAttribute DeploymentItemAttribute DeploymentItemAttribute Class

Definition

Used to specify deployment item (file or directory) for per-test deployment. Can be specified on test class or test method. Can have multiple instances of the attribute to specify more than one item. The item path can be absolute or relative, if relative, it is relative to RunConfig.RelativePathRoot.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class DeploymentItemAttribute : Attribute
type DeploymentItemAttribute = class
    inherit Attribute
Public NotInheritable Class DeploymentItemAttribute
Inherits Attribute
Inheritance
DeploymentItemAttributeDeploymentItemAttributeDeploymentItemAttribute
Attributes

Examples

[DeploymentItem("file1.xml")] [DeploymentItem("file2.xml", "DataFiles")] [DeploymentItem("bin\Debug")]

Constructors

DeploymentItemAttribute(String) DeploymentItemAttribute(String) DeploymentItemAttribute(String)

Initializes a new instance of the DeploymentItemAttribute class.

DeploymentItemAttribute(String, String) DeploymentItemAttribute(String, String) DeploymentItemAttribute(String, String)

Initializes a new instance of the DeploymentItemAttribute class

Properties

OutputDirectory OutputDirectory OutputDirectory

Gets the path of the directory to which the item is copied.

Path Path Path

Gets the path of the source file or folder to be copied.

Applies to