Compartilhar via


Propriedade VCWebDeploymentTool.RelativePath

Obtém ou define o caminho relativo ao diretório virtual e à qual a saída do projeto principal é copiada durante a implantação.

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (em Microsoft.VisualStudio.VCProjectEngine.dll)

Sintaxe

'Declaração
Property RelativePath As String
string RelativePath { get; set; }
property String^ RelativePath {
    String^ get ();
    void set (String^ value);
}
abstract RelativePath : string with get, set
function get RelativePath () : String 
function set RelativePath (value : String)

Valor de propriedade

Tipo: String
O caminho que é relativo ao diretório virtual e que a saída do projeto principal é copiada durante a implantação.

Comentários

Por padrão, o caminho relativo é bin.

Exemplos

Consulte Como compilar um código de exemplo para extensibilidade do modelo de projeto para obter informações sobre como compilar e executar esse exemplo.

O exemplo a seguir usa a RelativePath propriedade no ambiente de desenvolvimento integrado (IDE):

' 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"
      MsgBox(wdt.RelativePath)
   End Sub
End Module

Segurança do .NET Framework

Consulte também

Referência

VCWebDeploymentTool Interface

Namespace Microsoft.VisualStudio.VCProjectEngine