DeploymentItemAttribute Constructor (String, String)

Specifies an item to be deployed before a test run starts.

Namespace:  Microsoft.VisualStudio.TestTools.UnitTesting
Assembly:  Microsoft.VisualStudio.QualityTools.UnitTestFramework (in Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll)

Syntax

'Declaration
Public Sub New ( _
    path As String, _
    outputDirectory As String _
)
public DeploymentItemAttribute(
    string path,
    string outputDirectory
)
public:
DeploymentItemAttribute(
    String^ path, 
    String^ outputDirectory
)
new : 
        path:string * 
        outputDirectory:string -> DeploymentItemAttribute
public function DeploymentItemAttribute(
    path : String, 
    outputDirectory : String
)

Parameters

  • path
    Type: String

    The relative or absolute path to the file or directory to deploy. The path is relative to the build output directory. The item will be copied to the same directory as the deployed test assemblies.

  • outputDirectory
    Type: String

    The path of the directory to which the items are to be copied. It can be either absolute or relative to the deployment directory. All files and directories identified by path will be copied to this directory.

Remarks

To avoid dependency on your project structure, set the Copy to Output property of project files, and deploy them from the build output directory.

.NET Framework Security

See Also

Reference

DeploymentItemAttribute Class

DeploymentItemAttribute Overload

Microsoft.VisualStudio.TestTools.UnitTesting Namespace

Other Resources

Test Deployment