Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio .NET
Reference
Properties
 Project Property (VSProject Object)
Visual Basic and Visual C# Project Extensibility
Project Property (VSProject Object)

Returns the generic Project object associated with the Visual Basic or C# project. Read-only.

[Visual Basic .NET]
Public ReadOnly Property Project() As Project
[Visual Basic 6]
Property Get Project() As Project
[C++]
HRESULT __stdcall get_Project(
   /* [out, retval] */ Project** retVal
);
[C#]
Project Project {get;}
[JScript .NET]
public function get Project() : Project

Return Value

Returns a Project object.

Remarks

The VSProject object is a property of a generic Project object. The Project property provides access to the general extensibility Project object.

Example

' Macro Editor
Imports VSLangProj
' Displays whether project has unsaved changes.
Sub IsProjectSaved(ByVal aVSProject As VSProject)
   Dim theProject As EnvDTE.Project
   theProject = aVSProject.Project
   If (theProject.Saved) Then
      MsgBox(theProject.Name & " is saved.")
   Else
      MsgBox(theProject.Name & " is not saved.")
   End If
End Sub

See Also

Project Object | Projects Collection | VBProjects Property | CSharpProjects Property

Applies To: VSProject Object

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker