VCFile.RelativePath Propriedade

Definição

Obtém ou define o caminho relativo para o arquivo. Esse caminho deve ser relativo ao diretório do projeto e pode conter macros.

public:
 property System::String ^ RelativePath { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ RelativePath { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(402)]
public string RelativePath { [System.Runtime.InteropServices.DispId(402)] get; [System.Runtime.InteropServices.DispId(402)] set; }
[<System.Runtime.InteropServices.DispId(402)>]
[<get: System.Runtime.InteropServices.DispId(402)>]
[<set: System.Runtime.InteropServices.DispId(402)>]
member this.RelativePath : string with get, set
Public Property RelativePath As String

Valor da propriedade

String

O caminho relativo para o arquivo.

Atributos

Exemplos

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 Test()  
        Dim file As VCFile  
        Dim col As IVCCollection  
        Dim idx As Integer  
        Dim prj As VCProject  
        prj = DTE.Solution.Projects.Item(1).Object  
        col = prj.Files  
        For idx = 1 To col.Count  
            file = col.Item(idx)  
            MsgBox(file.RelativePath)  
        Next  
    End Sub  
End Module  

Comentários

Qualquer tentativa de definir o caminho relativo de um arquivo deve resultar em um caminho que concorde com a FullPath propriedade. Consulte como compilar código de exemplo para extensibilidade de modelo de projeto para obter informações sobre como compilar e executar este exemplo.

Aplica-se a