ProjectInstance Class

 

Represents a project instance.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:   Microsoft.Build.Execution
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

System.Object
  Microsoft.Build.Execution.ProjectInstance

[<DebuggerDisplayAttribute("{FullPath} #Targets={TargetsCount} DefaultTargets={(DefaultTargets == null) ? System.String.Empty : System.String.Join(\";\", DefaultTargets.ToArray())} ToolsVersion={Toolset.ToolsVersion} InitialTargets={(InitialTargets == null) ? System.String.Empty : System.String.Join(\";\", InitialTargets.ToArray())} #GlobalProperties={globalProperties.Count} #Properties={properties.Count} #ItemTypes={items.ItemTypes.Count} #Items={items.Count}")>]
type ProjectInstance = class end

NameDescription
System_CAPS_pubmethodProjectInstance(ProjectRootElement)

Creates a new project instance and initializes it from the given project root, using the default project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodProjectInstance(ProjectRootElement, IDictionary<String, String>, String, ProjectCollection)

Creates a new project instance and initializes it from the given project root, using the given global properties, tools version, and project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodProjectInstance(ProjectRootElement, IDictionary<String, String>, String, String, ProjectCollection)

Creates a new project instance and initializes it from the given project root, using the given global properties, tools version, and project collection

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodProjectInstance(String)

Creates a new project instance and initializes it from the given project file, using the default project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodProjectInstance(String, IDictionary<String, String>, String)

Creates a new project instance and initializes it from the given project file, using the given global properties, tools version, and the default project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodProjectInstance(String, IDictionary<String, String>, String, ProjectCollection)

Creates a new project instance and initializes it from the given project file, using the given global properties, tools version, and project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodProjectInstance(String, IDictionary<String, String>, String, String, ProjectCollection)

Creates a new project instance and initializes it from the given project file, using the given global properties, tools version, sub toolset version, and project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

NameDescription
System_CAPS_pubpropertyDefaultTargets

Gets or sets the list of default targets for this project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyDirectory

Gets the project root directory. Used for evaluation of relative paths and setting the current directory during build. Is never null: projects not loaded from disk use the current directory from the time the build started.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyFullPath

Gets the full path to the project file. Used for logging.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyGlobalProperties

Gets the dictionary of global properties this project was evaluated with, if any.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyInitialTargets

Gets the list of initial targets for the project and all its imports, depth-first. These targets are built before any other targets.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyIsImmutable

Gets a flag indicating that the project instance is immutable. This flag is set permanently when the instance is created.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyItemDefinitions

Gets a read-only dictionary of the item definitions in the project, keyed by item type.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyItems

Gets all items in this project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyItemTypes

Gets all item types in this project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyProjectFileLocation

Gets the location of the originating file itself. Never null.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyProperties

Gets all properties in this project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyTargets

Gets an enumerator over all targets in this project. This collection is read-only.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubpropertyToolsVersion

Gets the tools version this project was evaluated with, if any.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

NameDescription
System_CAPS_pubmethodAddItem(String, String)

Adds an item with no metadata to the project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodAddItem(String, String, IEnumerable<KeyValuePair<String, String>>)

Adds an item with the given metadata to the project.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild()

Builds the default targets of the project with loggers of the project collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(IEnumerable<ILogger>)

Builds the default targets of the project with the given loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>)

Builds the default targets of the project with the given loggers and remote loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(String, IEnumerable<ILogger>)

Builds the given target of the project with the given loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(String, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>)

Builds the given target of the project with the given loggers and remote loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(String[], IEnumerable<ILogger>)

Builds the given targets of the project with the given loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(String[], IEnumerable<ILogger>, IDictionary<String, TargetResult>)

Build a list of targets with specified loggers. Targets may be null. Loggers may be null.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(String[], IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>)

Builds the given targets of the project with the given loggers and remote loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodBuild(String[], IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, IDictionary<String, TargetResult>)

Builds the given targets with the given target outputs and with the given loggers and remote loggers.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodDeepCopy()

Creates an independent, deep clone of this project and everything in it. Clone has the same mutability as the original. Useful for compiling a single file or for keeping build results between builds.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodDeepCopy(Boolean)

Creates an independent, deep clone of this project and everything in it, with specified mutability. Useful for compiling a single file or for keeping build results between builds.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_pubmethodEvaluateCondition(String)

Evaluates the provided string as a condition by expanding items and properties, using the current items and properties available, then doing a logical evaluation.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodExpandString(String)

Evaluates the provided string by expanding items and properties, using the current items and properties available.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetEvaluatedItemIncludeEscaped(ProjectItemDefinitionInstance)

Gets the evaluated, escaped value of the Include attribute of the provided item definition.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodSystem_CAPS_staticGetEvaluatedItemIncludeEscaped(ProjectItemInstance)

Gets the evaluated, escaped value of the Include attribute of the provided item.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetItems(String)

Gets all the items in this project of the specified type. This is a read-only list.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodGetItemsByItemTypeAndEvaluatedInclude(String, String)

Gets all the items in this project of the specified type and evaluated include value. This is a read-only list.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodSystem_CAPS_staticGetMetadataValueEscaped(ProjectItemDefinitionInstance, String)

Gets the escaped value of the metadatum with the provided name of the provided item definition.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodSystem_CAPS_staticGetMetadataValueEscaped(ProjectItemInstance, String)

Gets the escaped value of the metadatum with the provided name on the provided item.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodSystem_CAPS_staticGetMetadataValueEscaped(ProjectMetadataInstance)

Gets the escaped value of the provided metadatum.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodGetProperty(String)

Get the property with the given name.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodGetPropertyValue(String)

Get the value of the property with the given name.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodSystem_CAPS_staticGetPropertyValueEscaped(ProjectPropertyInstance)

Get the escaped value of the provided property.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRemoveItem(ProjectItemInstance)

Removes an item from the project, if present. Returns true if it was present, false otherwise.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodRemoveProperty(String)

Removes a property with the given name. Returns true if the property had a value (possibly empty string), otherwise false.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodSetProperty(String, String)

Add a property with the specified name and value to the project. Overwrites any property with the same name already in the property collection.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodToProjectRootElement()

Creates a ProjectRootElement from the contents of this ProjectInstance.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUpdateStateFrom(ProjectInstance)

Replaces the project state GlobalProperties, Properties and Items with those from the specified ProjectInstance.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Instances of this class result when a project is cloned. Constructors are internal in order to require users to create project instances from existing projects.

New project instances are immutable, except that instance items can be added to them and instance properties set on them. Project instances are useful because they can be modified and built several times without disturbing the original project.

Neither this class nor any of its constituents is allowed to have references to Microsoft.Build.Construction or Microsoft.Build.Evaluation objects.

Project instance targets, host services, and the task registry are not exposed.

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: