ProjectCollection Class

ProjectCollection Class

 

Encapsulates a set of related projects, their toolsets, a default set of global properties, and the loggers that should be used to build them. A global version of this class acts as 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.

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

System.Object
  Microsoft.Build.Evaluation.ProjectCollection

public class ProjectCollection : IDisposable

NameDescription
System_CAPS_pubmethodProjectCollection()

Creates a project collection with no global properties or loggers. The project collection toolset is initialized from the configuration file and registry.

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_pubmethodProjectCollection(IDictionary<String, String>)

Instantiates a project collection with specified global properties, no loggers, and that reads toolset information from the configuration file and registry.

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_pubmethodProjectCollection(IDictionary<String, String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean)

Creates a project collection with specified global properties, loggers, node count, and onlyLogCriticalEvents value. The project collection toolset is initialized from toolsets in the given locations.

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_pubmethodProjectCollection(IDictionary<String, String>, IEnumerable<ILogger>, ToolsetDefinitionLocations)

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations.

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_pubmethodProjectCollection(ToolsetDefinitionLocations)

Creates a project collection with no global properties or loggers. The project collection toolset is initialized from toolsets in the given locations.

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_pubpropertyCount

Gets the number of projects currently loaded into this 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_pubpropertyDefaultToolsVersion

Gets the default tools version of this 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_pubpropertyDisableMarkDirty

Gets or sets a flag that determines whether MarkDirty is temporarily disabled on projects in this collection. This allows, for example, a global properties to be set without projects getting marked dirty for reevaluation as a consequence.

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_pubpropertySystem_CAPS_staticGlobalProjectCollection

Gets the global project collection object.

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 read-only default global properties for all projects in this 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_pubpropertyHostServices

Gets or sets an object that provides host services to tasks during builds of projects contained in 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_pubpropertyIsBuildEnabled

Gets or sets a property that selects by default whether the targets and tasks of projects in the project collection can be built.

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_pubpropertyLoadedProjects

Gets all the projects currently loaded into this 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_pubpropertyLoggers

Gets all loggers that projects in this collection can use for their 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_pubpropertyOnlyLogCriticalEvents

Gets or sets a switch that determines whether only critical events such as warnings and errors are logged.

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_pubpropertySkipEvaluation

Gets or sets a flag the determines whether ReevaluateIfNecessary is temporarily disabled on projects in this collection. This is useful when the host expects to make a number of reads and writes to projects, and wants to temporarily sacrifice correctness for performance.

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_pubpropertyToolsetLocations

Gets the locations used to find the toolsets.

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_pubpropertyToolsets

Gets the toolsets available to this 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_pubpropertySystem_CAPS_staticVersion

Gets the file version of the assembly file that contains the MSBuild engine.

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_pubmethodAddToolset(Toolset)

Adds a new toolset to the project collection. Replaces any existing toolset with the same tools version.

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_pubmethodContainsToolset(String)

Determines whether a toolset is defined for the given tools version.

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_pubmethodDispose()

Releases both managed and unmanaged resources. Called when a host no longer needs 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_protmethodDispose(Boolean)

Releases both managed and unmanaged resources. Called when a host no longer needs the project collection.. Shuts down any logging services that the project collection owns and releases the logger thread.

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_pubmethodSystem_CAPS_staticEscape(String)

Converts special characters in a string to MSBuild escape format.

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_pubmethodGetEffectiveToolsVersion(String, String)

Figure out what ToolsVersion is used to actually build the project.

System_CAPS_pubmethodGetGlobalProperty(String)

Get any global property on the project collection that has the specified 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_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLoadedProjects(String)

Gets all projects whose project path matches the given path.

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_pubmethodGetToolset(String)

Get the toolset with the specified tools version.

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_pubmethodLoadProject(String)

Evaluates a project from the source code in the given project file. The source code is evaluated with the global properties and tools version of this 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_pubmethodLoadProject(String, IDictionary<String, String>, String)

Evaluates a project from the source code read from the given project file. The source code is evaluated with the given global properties and tools version.

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_pubmethodLoadProject(String, String)

Evaluates a project from the source code read from the given project file. The source code is evaluated with the global properties of this project collection and the given tools version.

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_pubmethodLoadProject(XmlReader)

Evaluates a project from the source code read from the given XML reader. The source code is evaluated with the global properties and tools version of this 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_pubmethodLoadProject(XmlReader, IDictionary<String, String>, String)

Evaluates a project from the source code read from the given XML reader. The source code is evaluated with the given global properties and tools version.

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_pubmethodLoadProject(XmlReader, String)

Evaluates a project from the source code read from the given XML reader. The source code is evaluated with the global properties of this project collection and the given tools version.

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_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodRegisterForwardingLoggers(IEnumerable<ForwardingLoggerRecord>)

Adds the given remote loggers to the collection of remote loggers used for builds of projects in this 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_pubmethodRegisterLogger(ILogger)

Adds the given logger to the collection of loggers used for builds of projects in this 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_pubmethodRegisterLoggers(IEnumerable<ILogger>)

Adds the given loggers to the collection of loggers used for builds of projects in this 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_pubmethodRemoveAllToolsets()

Removes all toolsets from 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_pubmethodRemoveGlobalProperty(String)

Removes a global property from the set of default global properties.

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_pubmethodRemoveToolset(String)

Removes a toolset from 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_pubmethodSetGlobalProperty(String, String)

Sets the value of a property in the default set of global properties.

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_pubmethodTryUnloadProject(ProjectRootElement)

Attempts to remove a project from the 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_pubmethodSystem_CAPS_staticUnescape(String)

Converts escaped characters in a string to MSBuild characters with special meaning.

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_pubmethodUnloadAllProjects()

Removes all projects in this 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_pubmethodUnloadProject(Project)

Removes the given project from 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_pubmethodUnloadProject(ProjectRootElement)

Removes a project root element from the project root cache.

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_pubmethodUnregisterAllLoggers()

Removes all loggers from the collection of loggers used by project builds in this 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_pubeventProjectAdded

Event that is fired when a project is added to the ProjectRootElementCache of this 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_pubeventProjectChanged

Raised when a Project contained by this instance is directly changed.

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_pubeventProjectCollectionChanged

Raised when state is changed on this 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.

System_CAPS_pubeventProjectXmlChanged

Raised when a ProjectRootElement contained by this instance is changed.

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.

Multiple project collections can exist within an app domain. However, these must not build concurrently.

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