Project Interface

 

Represents a project in the integrated development environment (IDE).

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

[GuidAttribute("866311E6-C887-4143-9833-645F5B93F6F1")]
public interface Project

NameDescription
System_CAPS_pubpropertyCodeModel

Gets the CodeModel object for the project.

System_CAPS_pubpropertyCollection

Gets the Projects collection containing the Project object supporting this property.

System_CAPS_pubpropertyConfigurationManager

Gets the ConfigurationManager object for this Project .

System_CAPS_pubpropertyDTE

Gets the top-level extensibility object.

System_CAPS_pubpropertyExtender[String]

Gets the requested Extender object if it is available for this object.

System_CAPS_pubpropertyExtenderCATID

Gets the Extender category ID (CATID) for the object.

System_CAPS_pubpropertyExtenderNames

Gets a list of available Extenders for the object.

System_CAPS_pubpropertyFileName

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.

System_CAPS_pubpropertyFullName

Gets the full path and name of the Project object's file.

System_CAPS_pubpropertyGlobals

Gets the Globals object containing values that may be saved in the solution (.sln) file, the project file, or in the user's profile data.

System_CAPS_pubpropertyIsDirty

This API supports the product infrastructure and is not intended to be used directly from your code. Microsoft Internal Use Only.

System_CAPS_pubpropertyKind

Gets a GUID string indicating the kind or type of the object.

System_CAPS_pubpropertyName

Gets or sets the name of the object.

System_CAPS_pubpropertyObject

Gets an interface or object that can be accessed by name at run time.

System_CAPS_pubpropertyParentProjectItem

Gets a ProjectItem object for the nested project in the host project.

System_CAPS_pubpropertyProjectItems

Gets a ProjectItems collection for the Project object.

System_CAPS_pubpropertyProperties

Gets a collection of all properties that pertain to the Project object.

System_CAPS_pubpropertySaved

Gets or sets a value indicating whether the object has not been modified since last being saved or opened.

System_CAPS_pubpropertyUniqueName

Gets a unique string value that allows you to differentiate between similarly named projects.

NameDescription
System_CAPS_pubmethodDelete()

Removes the project from the current solution.

Note that this method is not currently implemented.

System_CAPS_pubmethodSave(String)

Saves the project or project item.

System_CAPS_pubmethodSaveAs(String)

Saves the solution, project, or project item.

Every project in the solution has a project automation interface. In rare cases, this is a generic, unmodeled project implementation that returns the project's name.

Every tool in the environment that has a project has a Project object.

Reference this object by using DTE.Solution.Item or by using a specific language's objects, such as DTE.VBProjects.Item, or DTE.VCProjects.Item.

System_CAPS_noteNote

Project-specific objects such as DTE.VBProjects.Item and DTE.VCProjects.Item are located in other assemblies. Visual Basic and Visual C# project objects are located in VSLangProj, and Visual C++ project objects are located in Microsoft.VisualStudio.VCProjectEngine. See Extending Visual Basic and Visual C# Projects and Visual C++ Project Model for more information about programming against project-specific objects.

Sub ProjectExample()
' This function creates a solution and adds a Visual Basic Console
' project to it. 
   Dim soln As Solution2
   Dim proj As Project
   Dim msg As String
' Create a reference to the solution.
   soln = DTE.Solution
' Create a new solution.
   soln.Create("c:\temp2", "MyNewSolution")
' Create a new Visual Basic Console application project. 
' Adjust the save path as needed.
   Dim fileN As String
   fileN = soln.GetProjectTemplate("ConsoleApplication.zip", "VisualBasic")
   proj = soln.AddFromTemplate(fileN, "c:\temp2", "My New Project", True)

' Save the new solution
   soln.SaveAs("c:\temp2\newsolution.sln")
   msg = "Created new solution: " & soln.FullName
   MsgBox(msg)
End Sub
Return to top
Show: