Compartilhar via


VCProject.ProjectFile Property

Definition

Gets the name of the project file.

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

Property Value

The name of the project file.

Attributes

Examples

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

The following example uses the ProjectFile property in the integrated development environment (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        prj = DTE.Solution.Projects.Item(1).Object  
        MsgBox(prj.ProjectFile)  
    End Sub  
End Module  

Applies to