Partager via


ProjectCollection Constructor (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.

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

Syntax

'Declaration
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 _
)
public ProjectCollection(
    IDictionary<string, string> globalProperties,
    IEnumerable<ILogger> loggers,
    IEnumerable<ForwardingLoggerRecord> remoteLoggers,
    ToolsetDefinitionLocations toolsetDefinitionLocations,
    int maxNodeCount,
    bool onlyLogCriticalEvents
)
public:
ProjectCollection(
    IDictionary<String^, String^>^ globalProperties, 
    IEnumerable<ILogger^>^ loggers, 
    IEnumerable<ForwardingLoggerRecord^>^ remoteLoggers, 
    ToolsetDefinitionLocations toolsetDefinitionLocations, 
    int maxNodeCount, 
    bool onlyLogCriticalEvents
)
new : 
        globalProperties:IDictionary<string, string> * 
        loggers:IEnumerable<ILogger> * 
        remoteLoggers:IEnumerable<ForwardingLoggerRecord> * 
        toolsetDefinitionLocations:ToolsetDefinitionLocations * 
        maxNodeCount:int * 
        onlyLogCriticalEvents:bool -> ProjectCollection
public function ProjectCollection(
    globalProperties : IDictionary<String, String>, 
    loggers : IEnumerable<ILogger>, 
    remoteLoggers : IEnumerable<ForwardingLoggerRecord>, 
    toolsetDefinitionLocations : ToolsetDefinitionLocations, 
    maxNodeCount : int, 
    onlyLogCriticalEvents : boolean
)

Parameters

  • globalProperties
    Type: IDictionary<String, String>

    The default global properties to use. May be null.

  • loggers
    Type: IEnumerable<ILogger>

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

  • remoteLoggers
    Type: IEnumerable<ForwardingLoggerRecord>

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

  • maxNodeCount
    Type: System.Int32

    The maximum number of nodes to use for building.

  • onlyLogCriticalEvents
    Type: System.Boolean

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

Remarks

Throws InvalidProjectFileException if any of the global properties are reserved.

.NET Framework Security

See Also

Reference

ProjectCollection Class

ProjectCollection Overload

Microsoft.Build.Evaluation Namespace