This documentation is archived and is not being maintained.

RelativePath Property (VCWebDeploymentTool)

Visual Studio .NET 2003

The path relative to the virtual directory to which the primary project output is copied when deployment occurs.

[Visual Basic .NET]
Public Property RelativePath() As String
[Visual Basic 6]
Property Get RelativePath() As String
Property Let RelativePath( _
   ByVal NewValue As String _
HRESULT __stdcall get_RelativePath(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_RelativePath(
   /* [in] */ BSTR NewValue
public string RelativePath {get; set;}
[JScript .NET]
public function get RelativePath() : String
public function set RelativePath(
   NewValue : String


By default, the relative path is bin.


The following sample code uses the RelativePath property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
   Sub Main()
      Dim prj As VCProject
      Dim cfgs, tools As IVCCollection
      Dim cfg As VCConfiguration
      Dim wdt As VCWebDeploymentTool
      prj = DTE.Solution.Projects.Item(1).Object
      cfgs = prj.Configurations
      cfg = cfgs.Item(1)
      wdt = cfg.Tools("VCWebDeploymentTool")
      wdt.RelativePath = "relativePathName"
   End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

VirtualDirectoryName Property | PrimaryOutput Property | RelativePath Property

Applies To: VCWebDeploymentTool Object