Project Class

Project Class

 
Note: This API is now obsolete.

Represents a project that can be built using MSBuild.

Namespace:   Microsoft.Build.BuildEngine
Assembly:  Microsoft.Build.Engine (in Microsoft.Build.Engine.dll)

System.Object
  Microsoft.Build.BuildEngine.Project

[ObsoleteAttribute("This class has been deprecated. Please use Microsoft.Build.Evaluation.Project from the Microsoft.Build assembly instead.")]
public class Project

NameDescription
System_CAPS_pubmethodProject()

Initializes a new instance of the Project class.

System_CAPS_pubmethodProject(Engine)

Initializes a new instance of the Project class using the supplied Engine.

System_CAPS_pubmethodProject(Engine, String)

Initializes a new instance of the Project class using the supplied Engine and ToolsVersion.

NameDescription
System_CAPS_pubpropertyBuildEnabled

Gets or sets a value indicating whether the project is enabled for building tasks and targets.

System_CAPS_pubpropertyDefaultTargets

Gets or sets the DefaultTargets attribute of the element in the MSBuild project.

System_CAPS_pubpropertyDefaultToolsVersion

Sets or gets the ToolsVersion XML attribute found on the ProjectProject Element (MSBuild) element in the project file.

System_CAPS_pubpropertyEncoding

Gets the encoding for the project file.

System_CAPS_pubpropertyEvaluatedItems

Gets a collection of the items evaluated during the build.

System_CAPS_pubpropertyEvaluatedItemsIgnoringCondition

Gets a collection of all items in a project, even those not used in the build process because a attribute evaluated to false.

System_CAPS_pubpropertyEvaluatedProperties

Gets a collection of the properties evaluated during the build.

System_CAPS_pubpropertyFullFileName

Gets or sets the fully qualified path and file name of the project file.

System_CAPS_pubpropertyGlobalProperties

Gets or sets a collection of the global properties for the project.

System_CAPS_pubpropertyHasToolsVersionAttribute

Gets whether the Project file has the ToolsVersion XML attribute.

System_CAPS_pubpropertyImports

Gets the projects imported into this project.

System_CAPS_pubpropertyInitialTargets

Gets or sets the InitialTargets attribute of the element in the MSBuild project.

System_CAPS_pubpropertyIsDirty

Gets a value indicating whether the project has changed and needs to be saved to a file.

System_CAPS_pubpropertyIsValidated

Gets a value indicating whether the project is to be validated against a schema.

System_CAPS_pubpropertyItemGroups

Gets a collection of the item groups specified with the element in the project.

System_CAPS_pubpropertyParentEngine

Gets the Engine that builds the project.

System_CAPS_pubpropertyPropertyGroups

Gets a collection of the property groups specified with the element in the project.

System_CAPS_pubpropertySchemaFile

Gets or sets the XML schema file to use when validating the project.

System_CAPS_pubpropertyTargets

Gets the targets in the project.

System_CAPS_pubpropertyTimeOfLastDirty

Gets a DateTime object indicating the time the project was last changed in a way that required it to be saved to a file.

System_CAPS_pubpropertyToolsVersion

Sets or gets the current version of the Toolset being used by the project.

System_CAPS_pubpropertyUsingTasks

Gets a collection of the elements in the project.

System_CAPS_pubpropertyXml

Gets the XML representing the project.

NameDescription
System_CAPS_pubmethodAddNewImport(String, String)

Add an element to the end of the project.

System_CAPS_pubmethodAddNewItem(String, String)

Adds the specified element to the project.

System_CAPS_pubmethodAddNewItem(String, String, Boolean)

Adds the specified element to the project.

System_CAPS_pubmethodAddNewItemGroup()

Adds a new element to the project.

System_CAPS_pubmethodAddNewPropertyGroup(Boolean)

Adds a new element to the project.

System_CAPS_pubmethodAddNewUsingTaskFromAssemblyFile(String, String)

Adds a new element with the specified assembly file.

System_CAPS_pubmethodAddNewUsingTaskFromAssemblyName(String, String)

Adds a new element with the specified assembly name.

System_CAPS_pubmethodBuild()

Builds the default targets of the project.

System_CAPS_pubmethodBuild(String)

Builds the specified target in the project.

System_CAPS_pubmethodBuild(String[])

Builds the specified list of targets in the project.

System_CAPS_pubmethodBuild(String[], IDictionary)

Builds the specified list of targets in the project, and returns the outputs of the targets.

System_CAPS_pubmethodBuild(String[], IDictionary, BuildSettings)

Builds the specified list of targets in the project using the specified settings, and returns the outputs of the targets.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetConditionedPropertyValues(String)

Returns a list of possible values for the specified property.

System_CAPS_pubmethodGetEvaluatedItemsByName(String)

Returns all evaluated items belonging to the specified item collection.

System_CAPS_pubmethodGetEvaluatedItemsByNameIgnoringCondition(String)

Returns all items belonging to the specified item collection.

System_CAPS_pubmethodGetEvaluatedProperty(String)

Returns the value of the specified property.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetProjectExtensions(String)

Returns a string value of the XML from the specified element in the element.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodLoad(String)

Loads the contents of the specified project file into the Project object.

System_CAPS_pubmethodLoad(String, ProjectLoadSettings)

Reads the contents of this project from a project XML file on disk.

System_CAPS_pubmethodLoad(TextReader)

Loads the contents of the specified TextReader into the Project object.

System_CAPS_pubmethodLoad(TextReader, ProjectLoadSettings)

Reads the contents of this project from a string containing the XML contents.

System_CAPS_pubmethodLoadXml(String)

Loads the contents of the specified string into the Project object.

System_CAPS_pubmethodLoadXml(String, ProjectLoadSettings)

Reads the contents of this project from a string containing the XML contents.

System_CAPS_pubmethodMarkProjectAsDirty()

Sets the IsDirty property of the project to true.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemoveAllItemGroups()

Removes all item groups from the project, but does not modify imported projects.

System_CAPS_pubmethodRemoveAllPropertyGroups()

Removes all property groups from the project, but does not modify imported projects.

System_CAPS_pubmethodRemoveImportedPropertyGroup(BuildPropertyGroup)

Removes the specified property group from the main project file.

System_CAPS_pubmethodRemoveItem(BuildItem)

Removes the specified item from the project.

System_CAPS_pubmethodRemoveItemGroup(BuildItemGroup)

Removes the specified item group from the project.

System_CAPS_pubmethodRemoveItemGroupsWithMatchingCondition(String)

Removes all item groups with the specified from the project, but does not modify imported projects.

System_CAPS_pubmethodRemoveItemsByName(String)

Removes all items in the specified item collection from the project, but does not modify imported projects.

System_CAPS_pubmethodRemovePropertyGroup(BuildPropertyGroup)

Removes the specified property group from the project.

System_CAPS_pubmethodRemovePropertyGroupsWithMatchingCondition(String)

Removes all property groups with the specified from the project, but does not modify imported projects.

System_CAPS_pubmethodRemovePropertyGroupsWithMatchingCondition(String, Boolean)

Removes all <PropertyGroup>'s from the main project file that have a specific "Condition."

System_CAPS_pubmethodResetBuildStatus()

Resets the status every target in the project so that the next build will build all targets again.

System_CAPS_pubmethodSave(String)

Saves the project to the specified file.

System_CAPS_pubmethodSave(String, Encoding)

Saves the project in the specified file with the specified encoding.

System_CAPS_pubmethodSave(TextWriter)

Saves the project in the specified TextWriter object.

System_CAPS_pubmethodSetImportedProperty(String, String, String, Project)

Sets the value of a property in the specified imported project.

System_CAPS_pubmethodSetImportedProperty(String, String, String, Project, PropertyPosition)

Sets the value of a property in the specified imported project.

System_CAPS_pubmethodSetImportedProperty(String, String, String, Project, PropertyPosition, Boolean)

Sets the value of a property in the specified imported project.

System_CAPS_pubmethodSetProjectExtensions(String, String)

Sets the element of the project with the specified element name and content.

System_CAPS_pubmethodSetProperty(String, String)

Sets the value of the specified property.

System_CAPS_pubmethodSetProperty(String, String, String)

Sets the value of the specified property.

System_CAPS_pubmethodSetProperty(String, String, String, PropertyPosition)

Sets the value of the specified property.

System_CAPS_pubmethodSetProperty(String, String, String, PropertyPosition, Boolean)

Sets the value of the specified property.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

A Project represents an MSBuild project. It is a container for items, properties and targets. It can load project content from in-memory XML or from an XML file, and can save to an XML file, preserving most whitespace and all XML comments.

Every Project must be associated with an Engine to access shared information. During a build, the Engine object keeps track of which projects are currently building.

.NET Framework
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft