다음을 통해 공유


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.

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

Examples

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

Constructors

DeploymentItemAttribute(String, String)

Initializes a new instance of the DeploymentItemAttribute class

DeploymentItemAttribute(String)

Initializes a new instance of the DeploymentItemAttribute class.

Properties

OutputDirectory

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

Path

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

Applies to