Partilhar via


ProjectCollection Constructors

Definition

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

Overloads

ProjectCollection()

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

ProjectCollection(ToolsetDefinitionLocations)

Instantiates a project collection using toolsets from the specified locations, and no global properties or loggers. May throw InvalidToolsetDefinitionException.

ProjectCollection(IDictionary<String,String>)

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

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, ToolsetDefinitionLocations)

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

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean)

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations, node count, and setting of onlyLogCriticalEvents. Global properties and loggers may be null. Throws InvalidProjectFileException if any of the global properties are reserved. May throw InvalidToolsetDefinitionException.

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean, Boolean)

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations, node count, and setting of onlyLogCriticalEvents. Global properties and loggers may be null. Throws InvalidProjectFileException if any of the global properties are reserved. May throw InvalidToolsetDefinitionException.

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean, Boolean, Boolean, Boolean)

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations, node count, and setting of onlyLogCriticalEvents. Global properties and loggers may be null. Throws InvalidProjectFileException if any of the global properties are reserved. May throw InvalidToolsetDefinitionException.

ProjectCollection()

Source:
ProjectCollection.cs

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

public:
 ProjectCollection();
public ProjectCollection ();
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public ProjectCollection ();
Public Sub New ()
Attributes

Applies to

ProjectCollection(ToolsetDefinitionLocations)

Source:
ProjectCollection.cs

Instantiates a project collection using toolsets from the specified locations, and no global properties or loggers. May throw InvalidToolsetDefinitionException.

public:
 ProjectCollection(Microsoft::Build::Evaluation::ToolsetDefinitionLocations toolsetLocations);
public ProjectCollection (Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetLocations);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public ProjectCollection (Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetLocations);
new Microsoft.Build.Evaluation.ProjectCollection : Microsoft.Build.Evaluation.ToolsetDefinitionLocations -> Microsoft.Build.Evaluation.ProjectCollection
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.ProjectCollection : Microsoft.Build.Evaluation.ToolsetDefinitionLocations -> Microsoft.Build.Evaluation.ProjectCollection
Public Sub New (toolsetLocations As ToolsetDefinitionLocations)

Parameters

toolsetLocations
ToolsetDefinitionLocations

The locations from which to load toolsets.

Attributes

Applies to

ProjectCollection(IDictionary<String,String>)

Source:
ProjectCollection.cs

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

public:
 ProjectCollection(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties);
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties);
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> -> Microsoft.Build.Evaluation.ProjectCollection
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> -> Microsoft.Build.Evaluation.ProjectCollection
Public Sub New (globalProperties As IDictionary(Of String, String))

Parameters

globalProperties
IDictionary<String,String>

The default global properties to use. May be null.

Attributes

Remarks

May throw InvalidToolsetDefinitionException.

Applies to

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, ToolsetDefinitionLocations)

Source:
ProjectCollection.cs

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

public:
 ProjectCollection(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::Collections::Generic::IEnumerable<Microsoft::Build::Framework::ILogger ^> ^ loggers, Microsoft::Build::Evaluation::ToolsetDefinitionLocations toolsetDefinitionLocations);
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties, System.Collections.Generic.IEnumerable<Microsoft.Build.Framework.ILogger> loggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations);
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties, System.Collections.Generic.IEnumerable<Microsoft.Build.Framework.ILogger> loggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations);
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> * seq<Microsoft.Build.Framework.ILogger> * Microsoft.Build.Evaluation.ToolsetDefinitionLocations -> Microsoft.Build.Evaluation.ProjectCollection
[<System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> * seq<Microsoft.Build.Framework.ILogger> * Microsoft.Build.Evaluation.ToolsetDefinitionLocations -> Microsoft.Build.Evaluation.ProjectCollection
Public Sub New (globalProperties As IDictionary(Of String, String), loggers As IEnumerable(Of ILogger), toolsetDefinitionLocations As ToolsetDefinitionLocations)

Parameters

globalProperties
IDictionary<String,String>

The default global properties to use. May be null.

loggers
IEnumerable<ILogger>

The loggers to register. May be null.

toolsetDefinitionLocations
ToolsetDefinitionLocations

The locations from which to load toolsets.

Attributes

Remarks

May throw InvalidToolsetDefinitionException.

Applies to

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean)

Source:
ProjectCollection.cs

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations, node count, and setting of onlyLogCriticalEvents. Global properties and loggers may be null. Throws InvalidProjectFileException if any of the global properties are reserved. May throw InvalidToolsetDefinitionException.

public:
 ProjectCollection(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::Collections::Generic::IEnumerable<Microsoft::Build::Framework::ILogger ^> ^ loggers, System::Collections::Generic::IEnumerable<Microsoft::Build::Logging::ForwardingLoggerRecord ^> ^ remoteLoggers, Microsoft::Build::Evaluation::ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents);
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties, System.Collections.Generic.IEnumerable<Microsoft.Build.Framework.ILogger> loggers, System.Collections.Generic.IEnumerable<Microsoft.Build.Logging.ForwardingLoggerRecord> remoteLoggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents);
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> * seq<Microsoft.Build.Framework.ILogger> * seq<Microsoft.Build.Logging.ForwardingLoggerRecord> * Microsoft.Build.Evaluation.ToolsetDefinitionLocations * int * bool -> Microsoft.Build.Evaluation.ProjectCollection
Public Sub New (globalProperties As IDictionary(Of String, String), loggers As IEnumerable(Of ILogger), remoteLoggers As IEnumerable(Of ForwardingLoggerRecord), toolsetDefinitionLocations As ToolsetDefinitionLocations, maxNodeCount As Integer, onlyLogCriticalEvents As Boolean)

Parameters

globalProperties
IDictionary<String,String>

The default global properties to use. May be null.

loggers
IEnumerable<ILogger>

The loggers to register. May be null and specified to any build instead.

remoteLoggers
IEnumerable<ForwardingLoggerRecord>

Any remote loggers to register. May be null and specified to any build instead.

toolsetDefinitionLocations
ToolsetDefinitionLocations

The locations from which to load toolsets.

maxNodeCount
Int32

The maximum number of nodes to use for building.

onlyLogCriticalEvents
Boolean

If set to true, only critical events will be logged.

Remarks

Throws InvalidProjectFileException if any of the global properties are reserved.

Applies to

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean, Boolean)

Source:
ProjectCollection.cs

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations, node count, and setting of onlyLogCriticalEvents. Global properties and loggers may be null. Throws InvalidProjectFileException if any of the global properties are reserved. May throw InvalidToolsetDefinitionException.

public:
 ProjectCollection(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::Collections::Generic::IEnumerable<Microsoft::Build::Framework::ILogger ^> ^ loggers, System::Collections::Generic::IEnumerable<Microsoft::Build::Logging::ForwardingLoggerRecord ^> ^ remoteLoggers, Microsoft::Build::Evaluation::ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly);
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties, System.Collections.Generic.IEnumerable<Microsoft.Build.Framework.ILogger> loggers, System.Collections.Generic.IEnumerable<Microsoft.Build.Logging.ForwardingLoggerRecord> remoteLoggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly);
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> * seq<Microsoft.Build.Framework.ILogger> * seq<Microsoft.Build.Logging.ForwardingLoggerRecord> * Microsoft.Build.Evaluation.ToolsetDefinitionLocations * int * bool * bool -> Microsoft.Build.Evaluation.ProjectCollection
Public Sub New (globalProperties As IDictionary(Of String, String), loggers As IEnumerable(Of ILogger), remoteLoggers As IEnumerable(Of ForwardingLoggerRecord), toolsetDefinitionLocations As ToolsetDefinitionLocations, maxNodeCount As Integer, onlyLogCriticalEvents As Boolean, loadProjectsReadOnly As Boolean)

Parameters

globalProperties
IDictionary<String,String>

The default global properties to use. May be null.

loggers
IEnumerable<ILogger>

The loggers to register. May be null and specified to any build instead.

remoteLoggers
IEnumerable<ForwardingLoggerRecord>

Any remote loggers to register. May be null and specified to any build instead.

toolsetDefinitionLocations
ToolsetDefinitionLocations

The locations from which to load toolsets.

maxNodeCount
Int32

The maximum number of nodes to use for building.

onlyLogCriticalEvents
Boolean

If set to true, only critical events will be logged.

loadProjectsReadOnly
Boolean

If set to true, load all projects as read-only.

Applies to

ProjectCollection(IDictionary<String,String>, IEnumerable<ILogger>, IEnumerable<ForwardingLoggerRecord>, ToolsetDefinitionLocations, Int32, Boolean, Boolean, Boolean, Boolean)

Source:
ProjectCollection.cs

Instantiates a project collection with specified global properties and loggers and using the specified toolset locations, node count, and setting of onlyLogCriticalEvents. Global properties and loggers may be null. Throws InvalidProjectFileException if any of the global properties are reserved. May throw InvalidToolsetDefinitionException.

public:
 ProjectCollection(System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ globalProperties, System::Collections::Generic::IEnumerable<Microsoft::Build::Framework::ILogger ^> ^ loggers, System::Collections::Generic::IEnumerable<Microsoft::Build::Logging::ForwardingLoggerRecord ^> ^ remoteLoggers, Microsoft::Build::Evaluation::ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache);
public ProjectCollection (System.Collections.Generic.IDictionary<string,string> globalProperties, System.Collections.Generic.IEnumerable<Microsoft.Build.Framework.ILogger> loggers, System.Collections.Generic.IEnumerable<Microsoft.Build.Logging.ForwardingLoggerRecord> remoteLoggers, Microsoft.Build.Evaluation.ToolsetDefinitionLocations toolsetDefinitionLocations, int maxNodeCount, bool onlyLogCriticalEvents, bool loadProjectsReadOnly, bool useAsynchronousLogging, bool reuseProjectRootElementCache);
new Microsoft.Build.Evaluation.ProjectCollection : System.Collections.Generic.IDictionary<string, string> * seq<Microsoft.Build.Framework.ILogger> * seq<Microsoft.Build.Logging.ForwardingLoggerRecord> * Microsoft.Build.Evaluation.ToolsetDefinitionLocations * int * bool * bool * bool * bool -> Microsoft.Build.Evaluation.ProjectCollection
Public Sub New (globalProperties As IDictionary(Of String, String), loggers As IEnumerable(Of ILogger), remoteLoggers As IEnumerable(Of ForwardingLoggerRecord), toolsetDefinitionLocations As ToolsetDefinitionLocations, maxNodeCount As Integer, onlyLogCriticalEvents As Boolean, loadProjectsReadOnly As Boolean, useAsynchronousLogging As Boolean, reuseProjectRootElementCache As Boolean)

Parameters

globalProperties
IDictionary<String,String>

The default global properties to use. May be null.

loggers
IEnumerable<ILogger>

The loggers to register. May be null and specified to any build instead.

remoteLoggers
IEnumerable<ForwardingLoggerRecord>

Any remote loggers to register. May be null and specified to any build instead.

toolsetDefinitionLocations
ToolsetDefinitionLocations

The locations from which to load toolsets.

maxNodeCount
Int32

The maximum number of nodes to use for building.

onlyLogCriticalEvents
Boolean

If set to true, only critical events will be logged.

loadProjectsReadOnly
Boolean

If set to true, load all projects as read-only.

useAsynchronousLogging
Boolean

If set to true, asynchronous logging will be used. Dispose() has to called to clear resources used by async logging.

reuseProjectRootElementCache
Boolean

If set to true, it will try to reuse Microsoft.Build.Evaluation.ProjectRootElementCacheBase singleton.

Applies to