Export (0) Print
Expand All
Expand Minimize

ProjectFile Property

Visual Studio .NET 2003

Returns the name of the project file.

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

Example

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

' 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

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

See Also

Applies To: VCProject Object

Show:
© 2014 Microsoft