BackEnd\BuildManager\BuildManager.cs (22)
297ErrorUtilities.VerifyThrowArgumentNull(hostName);
935ErrorUtilities.VerifyThrow(configuration.Project != null, "Configuration should have been loaded.");
968ErrorUtilities.VerifyThrowArgumentNull(requestData);
1067ErrorUtilities.VerifyThrow(_buildSubmissions.Count == 0, "All submissions not yet complete.");
1068ErrorUtilities.VerifyThrow(_activeNodes.Count == 0, "All nodes not yet shut down.");
1495ErrorUtilities.VerifyThrowArgumentNull(submission);
1496ErrorUtilities.VerifyThrow(!submission.IsCompleted, "Submission already complete.");
1512ErrorUtilities.VerifyThrowArgument(
1535ErrorUtilities.VerifyThrow(
1609ErrorUtilities.VerifyThrow(resolvedConfiguration is not null, "Cannot call project cache without having BuildRequestConfiguration");
1730ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(config.ProjectFullPath), "{0} is not a solution", config.ProjectFullPath);
1902ErrorUtilities.ThrowInternalError("Unexpected packet received by BuildManager: {0}", packet.Type);
2226ErrorUtilities.VerifyThrow(
2377ErrorUtilities.ThrowInvalidOperation(exceptionResouorce);
2386ErrorUtilities.VerifyThrowInvalidOperation(_buildManagerState == requiredState, exceptionResouorce);
2396ErrorUtilities.ThrowInternalError("Expected state {0}, actual state {1}", requiredState, _buildManagerState);
2738ErrorUtilities.VerifyThrow(_activeNodes.Contains(node), "Unexpected shutdown from node {0} which shouldn't exist.", node);
2941ErrorUtilities.ThrowInternalError("Scheduling action {0} not handled.", response.Action);
3384ErrorUtilities.ThrowInternalError("Incorrect packet type: {0} should have been {1}", packet.Type, expectedType);
3473ErrorUtilities.VerifyThrowInternalNull(inputCacheFiles);
3474ErrorUtilities.VerifyThrow(_configCache == null, "caches must not be set at this point");
3475ErrorUtilities.VerifyThrow(_resultsCache == null, "caches must not be set at this point");
BackEnd\BuildManager\LegacyThreadingData.cs (8)
58ErrorUtilities.VerifyThrow(_instanceForMainThread == null || (_instanceForMainThread != null && value == null) || (_instanceForMainThread == value), "Should not assign to instanceForMainThread twice without cleaning it");
91ErrorUtilities.VerifyThrow(!_legacyThreadingEventsById.ContainsKey(submissionId), "Submission {0} should not already be registered with LegacyThreadingData", submissionId);
107ErrorUtilities.VerifyThrow(_legacyThreadingEventsById.ContainsKey(submissionId), "Submission {0} should have been previously registered with LegacyThreadingData", submissionId);
130ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to wait on the legacy thread for submission {0}, but that submission has not been registered.", submissionId);
148ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to track when the legacy thread for submission {0} goes inactive, but that submission has not been registered.", submissionId);
158ErrorUtilities.VerifyThrow(
171ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to signal that the legacy thread is ready for submission {0} to execute, but that submission has not been registered", submissionId);
193ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to signal that submission {0} is done with the legacy thread, but that submission has not been registered", submissionId);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (26)
206ErrorUtilities.VerifyThrow(_componentHost != null, "BuildRequestEngine not initialized by component host.");
207ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Uninitialized, "Engine must be in the Uninitiailzed state, but is {0}", _status);
232ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Active || _status == BuildRequestEngineStatus.Idle || _status == BuildRequestEngineStatus.Waiting, "Engine must be Active, Idle or Waiting to clean up, but is {0}.", _status);
234ErrorUtilities.VerifyThrow(_nodeLoggingContext != null, "Node logging context not set.");
321ErrorUtilities.ThrowInternalError("Failure during engine shutdown. Exception: {0}", e.ToString());
352ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status.Box());
355ErrorUtilities.VerifyThrow(!_requestsByGlobalRequestId.ContainsKey(request.GlobalRequestId), "Request {0} is already known to the engine.", request.GlobalRequestId);
356ErrorUtilities.VerifyThrow(_configCache.HasConfiguration(request.ConfigurationId), "Request {0} refers to configuration {1} which is not known to the engine.", request.GlobalRequestId, request.ConfigurationId);
437ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status.Box());
438ErrorUtilities.VerifyThrow(_requestsByGlobalRequestId.ContainsKey(unblocker.BlockedRequestId), "Request {0} is not known to the engine.", unblocker.BlockedRequestId);
542ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status.Box());
545ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
635ErrorUtilities.VerifyThrowArgumentNull(host);
636ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!");
653ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Uninitialized, "Cleanup wasn't called, status is {0}", _status);
666ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestEngine, "Cannot create component of type {0}", type);
775ErrorUtilities.VerifyThrow(activeEntry == null, "Multiple active requests");
801ErrorUtilities.ThrowInternalError("Unexpected BuildRequestEntry state " + currentEntry.State);
956ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
1156ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
1337ErrorUtilities.VerifyThrow((requestsToIssue == null) || (requestsToIssue.Count == 0), "Entry shouldn't be ready if we also issued requests.");
1390ErrorUtilities.VerifyThrow(config.WasGeneratedByNode, "InvalidConfigurationId");
1391ErrorUtilities.VerifyThrowArgumentNull(config);
1392ErrorUtilities.VerifyThrow(_unresolvedConfigurationsById.ContainsKey(config.ConfigurationId), "NoUnresolvedConfiguration");
1403ErrorUtilities.VerifyThrowArgumentNull(blocker);
1458ErrorUtilities.ThrowInternalError(e.Message, e);
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (25)
126ErrorUtilities.VerifyThrowArgumentNull(request);
127ErrorUtilities.VerifyThrowArgumentNull(requestConfiguration);
128ErrorUtilities.VerifyThrowArgumentNull(taskEnvironment);
129ErrorUtilities.VerifyThrow(requestConfiguration.ConfigurationId == request.ConfigurationId, "Configuration id mismatch");
187ErrorUtilities.VerifyThrow(value == null || _requestBuilder == null, "Request Builder already set.");
204ErrorUtilities.VerifyThrow(configuration.WasGeneratedByNode, "Configuration has already been resolved.");
226ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active, "Must be in Active state to wait for blocking request. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
315ErrorUtilities.VerifyThrowArgumentNull(result);
320ErrorUtilities.ThrowInternalError("Entry must be in the Waiting state to report results, or we must have flushed our requests due to an error. Config: {0} State: {1} Requests: {2}", RequestConfiguration.ConfigurationId, State, _outstandingRequests != null);
348ErrorUtilities.VerifyThrow(result.CircularDependency, "Received result for target in progress and it wasn't a circular dependency error.");
380ErrorUtilities.VerifyThrow(!_outstandingResults.ContainsKey(result.NodeRequestId), "Request already contains results.");
399ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Waiting, "Entry must be in the waiting state to be unblocked. Config: {0} State: {1} Request: {2}", RequestConfiguration.ConfigurationId, State, Request.GlobalRequestId);
400ErrorUtilities.VerifyThrow(_blockingGlobalRequestId != BuildRequest.InvalidGlobalRequestId, "Entry must be waiting on another request to be unblocked. Config: {0} Request: {1}", RequestConfiguration.ConfigurationId, Request.GlobalRequestId);
417ErrorUtilities.VerifyThrow(_unresolvedConfigurations == null, "All configurations must be resolved before Continue may be called.");
418ErrorUtilities.VerifyThrow(_outstandingRequests == null, "All outstanding requests must have been satisfied.");
419ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Ready, "Entry must be in the Ready state. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
488ErrorUtilities.VerifyThrowArgumentNull(result);
489ErrorUtilities.VerifyThrow(Result == null, "Entry already Completed.");
496ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active, "Entry must be active before it can be Completed successfully. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
497ErrorUtilities.VerifyThrow(_unresolvedConfigurations == null, "Entry must not have any unresolved configurations.");
498ErrorUtilities.VerifyThrow(_outstandingRequests == null, "Entry must have no outstanding requests.");
499ErrorUtilities.VerifyThrow(_outstandingResults == null, "Results must be consumed before request may be completed.");
517ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active || State == BuildRequestEntryState.Waiting, "Must be in Active or Waiting state to wait for results. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
523ErrorUtilities.VerifyThrow(!_outstandingRequests.ContainsKey(newRequest.NodeRequestId), "Already waiting for local request {0}", newRequest.NodeRequestId);
528ErrorUtilities.VerifyThrow(addToIssueList, "Requests with unresolved configurations should always be added to the issue list.");
BackEnd\Components\Communications\NodeEndpointInProc.cs (19)
110ErrorUtilities.VerifyThrowArgumentNull(host);
172ErrorUtilities.VerifyThrowInternalNull(factory);
190ErrorUtilities.VerifyThrowInternalNull(factory);
220ErrorUtilities.VerifyThrow(_status == LinkStatus.Active, "Cannot send when link status is not active. Current status {0}", _status);
312ErrorUtilities.VerifyThrow(_status == LinkStatus.Active, "Endpoint is not connected. Current status {0}", _status);
329ErrorUtilities.VerifyThrow(_status != newStatus, "Attempting to change status to existing status {0}.", _status);
342ErrorUtilities.VerifyThrowArgumentNull(packet);
343ErrorUtilities.VerifyThrow(_mode == EndpointMode.Asynchronous, "EndPoint mode is synchronous, should be asynchronous");
344ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null");
345ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null");
358ErrorUtilities.VerifyThrow(_packetPump == null, "packetPump != null");
359ErrorUtilities.VerifyThrow(_packetAvailable == null, "packetAvailable != null");
360ErrorUtilities.VerifyThrow(_terminatePacketPump == null, "terminatePacketPump != null");
361ErrorUtilities.VerifyThrow(_packetQueue == null, "packetQueue != null");
395ErrorUtilities.VerifyThrow(_packetPump != null, "packetPump == null");
396ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable == null");
397ErrorUtilities.VerifyThrow(_terminatePacketPump != null, "terminatePacketPump == null");
398ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue == null");
454ErrorUtilities.ThrowInternalError("waitId {0} out of range.", waitId);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (12)
204ErrorUtilities.VerifyThrow(_nodeContexts.TryGetValue(nodeKey, out NodeContext context), "Invalid host context specified: {0}.", nodeKey);
350ErrorUtilities.VerifyThrow(packet.Type == NodePacketType.NodeShutdown, "We should only ever handle packets of type NodeShutdown -- everything else should only come in when there's an active task");
375ErrorUtilities.VerifyThrow(componentType == BuildComponentType.OutOfProcTaskHostNodeProvider, "Factory cannot create components of type {0}", componentType);
402ErrorUtilities.VerifyThrowInternalErrorUnreachable(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost));
433ErrorUtilities.VerifyThrowInternalErrorUnreachable(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost));
448ErrorUtilities.ThrowInternalError("ARM64 CLR2 task hosts are not supported.");
479ErrorUtilities.VerifyThrowInternalErrorUnreachable(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost));
506ErrorUtilities.ThrowInternalError(ResourceUtilities.GetResourceString("SDKPathResolution_Failed"));
511ErrorUtilities.ThrowInternalError(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("SDKPathCheck_Failed", path));
647ErrorUtilities.VerifyThrow(successRemoveFactory && successRemoveHandler, "Why are we trying to disconnect from a context that we already disconnected from? Did we call DisconnectFromHost twice?");
655ErrorUtilities.VerifyThrowArgumentNull(factory);
656ErrorUtilities.VerifyThrow(!_nodeContexts.ContainsKey(nodeKey), "We should not already have a node for this context! Did we forget to call DisconnectFromHost somewhere?");
BackEnd\Components\Logging\LoggingService.cs (19)
894ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
895ErrorUtilities.VerifyThrow(buildComponentHost != null, "BuildComponentHost was null");
933ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1003ErrorUtilities.VerifyThrow(packet != null, "packet was null");
1009ErrorUtilities.ThrowInternalError("Expected packet type \"{0}\" but instead got packet type \"{1}\".", nameof(NodePacketType.LogMessage), packet.Type.ToString());
1015ErrorUtilities.VerifyThrow(loggingPacket.EventType != LoggingEventType.CustomEvent, "Custom event types are no longer supported. Does the sending node have a different version?");
1032ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1033ErrorUtilities.VerifyThrow(logger != null, "logger was null");
1121ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1122ErrorUtilities.VerifyThrow(forwardingLogger != null, "forwardingLogger was null");
1188ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1189ErrorUtilities.VerifyThrow(forwardingLoggerSink != null, "forwardingLoggerSink was null");
1190ErrorUtilities.VerifyThrow(descriptions != null, "loggerDescriptions was null");
1191ErrorUtilities.VerifyThrow(descriptions.Count > 0, "loggerDescriptions was null");
1243ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
1305ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
1377ErrorUtilities.VerifyThrow(_configCache.Value.HasConfiguration(projectStartedEventArgs.ProjectId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node.");
1601ErrorUtilities.ThrowInternalError("Unknown logging item in queue:" + loggingEvent.GetType().FullName);
1990ErrorUtilities.ThrowInternalError(
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (31)
41ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for comment message.");
113ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message.");
138ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId);
156ErrorUtilities.VerifyThrow(invalidProjectFileException != null, "Need exception context.");
157ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext is null");
178ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId);
210ErrorUtilities.VerifyThrow(taskName != null, "Must specify the name of the task that failed.");
227ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message.");
261ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(taskName), "Must specify the name of the task that failed.");
286ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for warning message.");
303ErrorUtilities.VerifyThrow(file != null, "Must specify the associated file.");
304ErrorUtilities.VerifyThrow(message != null, "Need warning message.");
305ErrorUtilities.VerifyThrow(buildEventContext != null, "Need a BuildEventContext");
330ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId);
458ErrorUtilities.VerifyThrow(projectEvaluationEventContext != null, "projectBuildEventContext");
534ErrorUtilities.VerifyThrow(nodeBuildEventContext != null, "Need a nodeBuildEventContext");
543ErrorUtilities.ThrowInternalError("ContextID {0} for project {1} should not already be in the ID-to-file mapping!", projectContextId, projectFile);
555ErrorUtilities.ThrowInternalError("ContextID {0} was already in the ID-to-project file mapping but the project file {1} did not match the provided one {2}!", projectContextId, existingProjectFile, projectFile);
565ErrorUtilities.ThrowInternalError("ContextID {0} should have been in the ID-to-project file mapping but wasn't!", projectContextId);
574ErrorUtilities.VerifyThrow(parentBuildEventContext != null, "Need a parentBuildEventContext");
576ErrorUtilities.VerifyThrow(_configCache.Value.HasConfiguration(configurationId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node.");
608ErrorUtilities.VerifyThrow(projectBuildEventContext != null, "projectBuildEventContext");
625ErrorUtilities.ThrowInternalError("ContextID {0} for project {1} should be in the ID-to-file mapping!", projectBuildEventContext.ProjectContextId, projectFile);
643ErrorUtilities.VerifyThrow(projectBuildEventContext != null, "projectBuildEventContext is null");
684ErrorUtilities.VerifyThrow(targetBuildEventContext != null, "targetBuildEventContext is null");
711ErrorUtilities.VerifyThrow(taskBuildEventContext != null, "targetBuildEventContext is null");
740ErrorUtilities.VerifyThrow(targetBuildEventContext != null, "targetBuildEventContext is null");
780ErrorUtilities.VerifyThrow(taskBuildEventContext != null, "taskBuildEventContext is null");
806ErrorUtilities.VerifyThrow(eventName != null, "eventName is null");
828ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext was null");
829ErrorUtilities.VerifyThrow(filePath != null, "response file path was null");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (8)
224ErrorUtilities.VerifyThrowArgumentNull(projectCacheDescriptor.PluginAssemblyPath, nameof(projectCacheDescriptor.PluginAssemblyPath));
558ErrorUtilities.VerifyThrow(submission.BuildRequestData != null,
581ErrorUtilities.VerifyThrowInternalNull(buildRequest.ProjectInstance, nameof(buildRequest.ProjectInstance));
623ErrorUtilities.VerifyThrow(plugin.PluginInstance != null, "Plugin '{0}' instance is null", plugin.Name);
639ErrorUtilities.ThrowInternalError("Unknown plugin type", plugin.Name);
768ErrorUtilities.VerifyThrowInternalNull(projectConfiguration.Attributes, nameof(projectConfiguration.Attributes));
780ErrorUtilities.VerifyThrow(projectPathAttribute is not null, "Expected VS to set the project path on each ProjectConfiguration element.");
901ErrorUtilities.VerifyThrow(plugin.PluginInstance != null, "Plugin '{0}' instance is null", plugin.Name);
BackEnd\Components\RequestBuilder\Lookup.cs (13)
104ErrorUtilities.VerifyThrowInternalNull(projectItems);
105ErrorUtilities.VerifyThrowInternalNull(properties);
265ErrorUtilities.VerifyThrow(_lookupScopes.Count >= 2, "Too many calls to Leave().");
266ErrorUtilities.VerifyThrow(Object.ReferenceEquals(scopeToLeave, _lookupScopes), "Attempting to leave with scope '{0}' but scope '{1}' is on top of the stack.", scopeToLeave.Description, _lookupScopes.Description);
453ErrorUtilities.VerifyThrowInternalLength(name, nameof(name));
670ErrorUtilities.VerifyThrow(existing == null, "Cannot add an itemgroup of this type.");
697ErrorUtilities.VerifyThrow(_lookupScopes.ItemTypesToTruncateAtThisScope == null, "Cannot add an itemgroup of this type.");
906ErrorUtilities.VerifyThrow(!_cloneTable.ContainsKey(cloneItem), "Should be new, not already in table!");
1037ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.Contains(item), "Item should not be in table");
1052ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.ContainsKey(item), "Item should not be in table");
1083ErrorUtilities.VerifyThrow(_lookupScopes.Parent != null, "Operation in outer scope not supported");
1258ErrorUtilities.VerifyThrowInternalNull(value, "value");
1316ErrorUtilities.VerifyThrow(modificationType != ModificationType.Update, "Modification type may only be update when a value is specified.");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (43)
202ErrorUtilities.VerifyThrowArgumentNull(loggingContext);
203ErrorUtilities.VerifyThrowArgumentNull(entry);
204ErrorUtilities.VerifyThrow(_componentHost != null, "Host not set.");
205ErrorUtilities.VerifyThrow(_targetBuilder == null, "targetBuilder not null");
206ErrorUtilities.VerifyThrow(_nodeLoggingContext == null, "nodeLoggingContext not null");
207ErrorUtilities.VerifyThrow(_requestEntry == null, "requestEntry not null");
208ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Cancel already called");
228ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building");
229ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated");
230ErrorUtilities.VerifyThrow(!_continueEvent.WaitOne(0), "Request already continued");
234ErrorUtilities.VerifyThrow(_blockType == BlockType.BlockedOnTargetInProgress || _blockType == BlockType.Yielded || (_continueResults != null), "Unexpected null results for request {0} (nr {1})", _requestEntry.Request.GlobalRequestId, _requestEntry.Request.NodeRequestId);
245ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building");
246ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated");
247ErrorUtilities.VerifyThrow(!_pendingResourceRequests.IsEmpty, "No pending resource requests");
309ErrorUtilities.ThrowInvalidOperation("UnableToCancel");
338ErrorUtilities.VerifyThrowArgumentNull(projectFiles);
339ErrorUtilities.VerifyThrowArgumentNull(properties);
340ErrorUtilities.VerifyThrowArgumentNull(targets);
341ErrorUtilities.VerifyThrowArgumentNull(toolsVersions);
342ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
343ErrorUtilities.VerifyThrow(projectFiles.Length == properties.Length, "Properties and project counts not the same");
344ErrorUtilities.VerifyThrow(projectFiles.Length == toolsVersions.Length, "Tools versions and project counts not the same");
387ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests");
477ErrorUtilities.VerifyThrow(!_inMSBuildCallback, "Already in an MSBuild callback!");
487ErrorUtilities.VerifyThrow(_inMSBuildCallback, "Not in an MSBuild callback!");
496ErrorUtilities.VerifyThrow(Monitor.IsEntered(monitorLockObject), "Not running under the given lock");
556ErrorUtilities.VerifyThrowArgumentNull(host);
557ErrorUtilities.VerifyThrow(_componentHost == null, "RequestBuilder already initialized.");
633ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestBuilder, "Cannot create components of type {0}", type);
642ErrorUtilities.VerifyThrow(_requestTask == null, "Already have a task.");
684ErrorUtilities.VerifyThrow(_componentHost.LegacyThreadingData.MainThreadSubmissionId != _requestEntry.Request.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request.");
749ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Ready, "Entry is not in the Ready state, it is in the {0} state.", _requestEntry.State);
757ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Active, "Entry is not in the Active state, it is in the {0} state.", _requestEntry.State);
765ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Active || _requestEntry.State == BuildRequestEntryState.Waiting,
858ErrorUtilities.ThrowInternalError(ex.Message, ex);
868ErrorUtilities.VerifyThrow(result == null, "Result already set when exception was thrown.");
1002ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests");
1020ErrorUtilities.VerifyThrow(!isContinue, "Unexpected null results during continue");
1127ErrorUtilities.VerifyThrow(_targetBuilder != null, "Target builder is null");
1236ErrorUtilities.VerifyThrow(
1456ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedCurrentDirectory != null, "Current directory not previously saved.");
1457ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedEnvironmentVariables != null, "Current environment not previously saved.");
1481ErrorUtilities.VerifyThrow(!_isZombie, "RequestBuilder has been zombied.");
BackEnd\Components\RequestBuilder\TargetBuilder.cs (14)
110ErrorUtilities.VerifyThrowArgumentNull(loggingContext, "projectLoggingContext");
111ErrorUtilities.VerifyThrowArgumentNull(entry);
112ErrorUtilities.VerifyThrowArgumentNull(callback, "requestBuilderCallback");
113ErrorUtilities.VerifyThrowArgumentNull(targetNames);
114ErrorUtilities.VerifyThrowArgumentNull(baseLookup);
115ErrorUtilities.VerifyThrow(targetNames.Length > 0, "List of targets must be non-empty");
116ErrorUtilities.VerifyThrow(_componentHost != null, "InitializeComponent must be called before building targets.");
220ErrorUtilities.VerifyThrowArgumentNull(host);
286ErrorUtilities.VerifyThrow(pushed, "Failed to push any targets onto the stack. Target: {0} Current Target: {1}", targets[i], currentTargetEntry.Target.Name);
339ErrorUtilities.ThrowInternalError("This method should never be called by anyone except the TargetBuilder.");
400ErrorUtilities.VerifyThrow(type == BuildComponentType.TargetBuilder, "Cannot create components of type {0}", type);
485ErrorUtilities.VerifyThrow(!wasActivelyBuilding, "Target {0} was actively building and waited on but we are attempting to build it again.", currentTargetEntry.Name);
548ErrorUtilities.ThrowInternalError("Unexpected target state {0}", currentTargetEntry.State);
562ErrorUtilities.VerifyThrowInternalNull(targetResult, "targetResult");
BackEnd\Components\RequestBuilder\TargetEntry.cs (13)
173ErrorUtilities.VerifyThrowArgumentNull(requestEntry);
174ErrorUtilities.VerifyThrowArgumentNull(targetBuilderCallback);
175ErrorUtilities.VerifyThrowArgumentNull(targetSpecification, "targetName");
176ErrorUtilities.VerifyThrowArgumentNull(baseLookup, "lookup");
177ErrorUtilities.VerifyThrowArgumentNull(host);
422ErrorUtilities.VerifyThrow(!_isExecuting, "Target {0} is already executing", _target.Name);
700ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes.");
747ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes.");
772ErrorUtilities.VerifyThrow(_state != TargetEntryState.Completed, "State must not be Completed. State is {0}.", _state);
783ErrorUtilities.VerifyThrow(_state == TargetEntryState.Completed, "State must be Completed. State is {0}.", _state);
784ErrorUtilities.VerifyThrow(_targetResult.ResultCode == TargetResultCode.Skipped, "ResultCode must be Skipped. ResultCode is {0}.", _state);
785ErrorUtilities.VerifyThrow(_targetResult.WorkUnitResult.ActionCode == WorkUnitActionCode.Continue, "ActionCode must be Continue. ActionCode is {0}.", _state);
889ErrorUtilities.VerifyThrow(actual == expected, "Expected state {1}. Got {0}", actual, expected);
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (24)
58ErrorUtilities.VerifyThrow(project != null, "Need a project.");
59ErrorUtilities.VerifyThrow(targetToAnalyze != null, "Need a target to analyze.");
93ErrorUtilities.VerifyThrow(_targetInputSpecification != null, "targetInputSpecification is null");
106ErrorUtilities.VerifyThrow(_targetOutputSpecification != null, "targetOutputSpecification is null");
205ErrorUtilities.VerifyThrow(itemVectorsReferencedInBothTargetInputsAndOutputs.Count > 0, "The target must have inputs.");
206ErrorUtilities.VerifyThrow(!IsItemVectorEmpty(itemVectorsInTargetInputs), "The target must have inputs.");
610ErrorUtilities.VerifyThrow(inputItemVectors.Count == 1,
714ErrorUtilities.VerifyThrow(numberOfInputItemVectorsWithAllChangedItems <= itemVectorsReferencedInBothTargetInputsAndOutputs.Count,
720ErrorUtilities.VerifyThrow(result == DependencyAnalysisResult.IncrementalBuild,
849ErrorUtilities.VerifyThrow(!itemVectorPartition.ContainsKey(item), "ItemVectorPartition already contains a vector for items with the expression '{0}'", item);
852ErrorUtilities.VerifyThrow((itemVectorTransforms == null) || (itemVectorCollection.Equals(itemVectorTransforms)) || (itemVectorPartition.Count == 1),
963ErrorUtilities.VerifyThrow((inputs.Count > 0) && (outputs.Count > 0), "Need to specify inputs and outputs.");
966ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance");
971ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance");
982ErrorUtilities.ThrowIfTypeDoesNotImplementToString(outputs[0]);
1000ErrorUtilities.ThrowIfTypeDoesNotImplementToString(inputs[0]);
1008ErrorUtilities.ThrowIfTypeDoesNotImplementToString(outputs[i]);
1026ErrorUtilities.ThrowIfTypeDoesNotImplementToString(inputs[0]);
1043ErrorUtilities.ThrowIfTypeDoesNotImplementToString(input);
1086ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance");
1091ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance");
1099ErrorUtilities.ThrowIfTypeDoesNotImplementToString(input);
1107ErrorUtilities.ThrowIfTypeDoesNotImplementToString(output);
1199ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(path1) && !string.IsNullOrEmpty(path2),
BackEnd\Components\RequestBuilder\TaskHost.cs (22)
119ErrorUtilities.VerifyThrowArgumentNull(host);
120ErrorUtilities.VerifyThrowArgumentNull(requestEntry);
121ErrorUtilities.VerifyThrowInternalNull(taskLocation);
293ErrorUtilities.VerifyThrowArgument((targetOutputsPerProject == null) || (projectFileNames.Length == targetOutputsPerProject.Length), "General.TwoVectorsMustHaveSameLength", projectFileNames.Length, targetOutputsPerProject?.Length ?? 0, "projectFileNames", "targetOutputsPerProject");
301ErrorUtilities.VerifyThrow(targetOutputsPerProject.Length == result.TargetOutputsPerProject.Count, "{0} != {1}", targetOutputsPerProject.Length, result.TargetOutputsPerProject.Count);
361ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding.");
390ErrorUtilities.VerifyThrow(_yieldThreadId != -1, "Cannot call Reacquire() before Yield().");
391ErrorUtilities.VerifyThrow(_yieldThreadId == Environment.CurrentManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Environment.CurrentManagedThreadId, _yieldThreadId);
413ErrorUtilities.VerifyThrowArgumentNull(e);
483ErrorUtilities.VerifyThrowArgumentNull(e);
524ErrorUtilities.VerifyThrowArgumentNull(e);
565ErrorUtilities.VerifyThrowArgumentNull(e);
656ErrorUtilities.VerifyThrowArgumentNull(eventName);
815ErrorUtilities.VerifyThrowArgumentOutOfRange(requestedCores > 0, nameof(requestedCores));
862ErrorUtilities.VerifyThrowArgumentOutOfRange(coresToRelease > 0, nameof(coresToRelease));
972ErrorUtilities.VerifyThrowArgumentNull(projectFileNames);
973ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
1145ErrorUtilities.VerifyThrowArgumentNull(projectFileNames);
1146ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
1218ErrorUtilities.VerifyThrow(results.Length == projectFileNames.Length, "{0}!={1}.", results.Length, projectFileNames.Length);
1263ErrorUtilities.VerifyThrow(results.Length == projectFileNames.Length || !overallSuccess, "The number of results returned {0} cannot be less than the number of project files {1} unless one of the results indicated failure.", results.Length, projectFileNames.Length);
1278ErrorUtilities.VerifyThrow(_activeProxy, "Attempted to use an inactive task host.");
BackEnd\Components\Scheduler\SchedulableRequest.cs (26)
129ErrorUtilities.VerifyThrowArgumentNull(collection);
130ErrorUtilities.VerifyThrowArgumentNull(request);
131ErrorUtilities.VerifyThrow((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection.");
256ErrorUtilities.VerifyThrow(_creationTime == DateTime.MinValue, "Cannot set CreationTime twice.");
273ErrorUtilities.VerifyThrow(_startTime == DateTime.MinValue, "Cannot set StartTime twice.");
290ErrorUtilities.VerifyThrow(_endTime == DateTime.MinValue, "Cannot set EndTime twice.");
314ErrorUtilities.VerifyThrowArgumentNull(activeTargets);
338ErrorUtilities.VerifyThrowArgumentNull(blockingRequest);
339ErrorUtilities.VerifyThrowArgumentNull(activeTargets);
340ErrorUtilities.VerifyThrow(BlockingTarget == null, "Cannot block again if we're already blocked on a target");
345ErrorUtilities.VerifyThrow(!_requestsWeAreBlockedBy.ContainsKey(key), "We are already blocked by this request.");
346ErrorUtilities.VerifyThrow(!blockingRequest._requestsWeAreBlocking.Contains(this), "The blocking request thinks it is already blocking us.");
375ErrorUtilities.VerifyThrowArgumentNull(result);
388ErrorUtilities.VerifyThrowArgumentNull(result);
401ErrorUtilities.VerifyThrow(_assignedNodeId == Scheduler.InvalidNodeId || _assignedNodeId == nodeId, "Request must always resume on the same node on which it was started.");
404ErrorUtilities.VerifyThrow((_state == SchedulableRequestState.Ready) || !_schedulingData.IsRequestScheduled(this), "Another instance of request {0} is already scheduled.", _request.GlobalRequestId);
405ErrorUtilities.VerifyThrow(!_schedulingData.IsNodeWorking(nodeId), "Cannot resume execution of request {0} because node {1} is already working.", _request.GlobalRequestId, nodeId);
408ErrorUtilities.VerifyThrow(requiredNodeId == Scheduler.InvalidNodeId || requiredNodeId == nodeId, "Request {0} cannot be assigned to node {1} because its configuration is already assigned to node {2}", _request.GlobalRequestId, nodeId, requiredNodeId);
420ErrorUtilities.VerifyThrow(_state != SchedulableRequestState.Ready || result.CircularDependency, "Request can only be Completed from the Ready state if the result indicates a circular dependency occurred.");
421ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.Count == 0, "We can't be complete if we are still blocked on requests.");
439ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.Count == 0, "We are blocked by requests.");
440ErrorUtilities.VerifyThrow(_requestsWeAreBlocking.Count == 0, "We are blocking by requests.");
449ErrorUtilities.VerifyThrow(_state == requiredState, "Request {0} expected to be in state {1} but state is actually {2}", _request.GlobalRequestId, requiredState, _state);
465ErrorUtilities.ThrowInternalError("State {0} is not one of the expected states.", _state);
641ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.TryGetValue(blockingRequestKey, out SchedulableRequest unblockingRequest), "We are not blocked by the specified request.");
642ErrorUtilities.VerifyThrow(unblockingRequest._requestsWeAreBlocking.Contains(this), "The request unblocking us doesn't think it is blocking us.");
BackEnd\Components\Scheduler\Scheduler.cs (29)
359ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
364ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
373ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should exist");
385ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
431ErrorUtilities.VerifyThrow(result.ParentGlobalRequestId == request.Parent.BuildRequest.GlobalRequestId, "Result's parent doesn't match request's parent.");
549ErrorUtilities.ThrowInternalErrorUnreachable();
695ErrorUtilities.VerifyThrow(componentType == BuildComponentType.Scheduler, "Cannot create components of type {0}", componentType);
802ErrorUtilities.ThrowInternalError("Somehow no requests are currently executing, and at least one of the {0} requests blocked by in-progress requests is servicable by a currently existing node, but no circular dependency was detected ...", _schedulingData.BlockedRequestsCount);
809ErrorUtilities.ThrowInternalError("None of the {0} blocked requests can be serviced by currently existing nodes, but we aren't requesting a new one.", _schedulingData.BlockedRequestsCount);
815ErrorUtilities.ThrowInternalError("Somehow we have {0} requests which are ready to go but we didn't tell the nodes to continue.", _schedulingData.ReadyRequestsCount);
820ErrorUtilities.ThrowInternalError("Somehow we have {0} unassigned build requests but {1} of our nodes are free and we aren't requesting a new one...", _schedulingData.UnscheduledRequestsCount, idleNodes.Count);
825ErrorUtilities.VerifyThrow(responses.Count > 0, "We failed to request a node to be created.");
1409ErrorUtilities.VerifyThrowArgumentNull(request);
1410ErrorUtilities.VerifyThrowArgumentNull(responses);
1411ErrorUtilities.VerifyThrow(nodeId != InvalidNodeId, "Invalid node id specified.");
1426ErrorUtilities.VerifyThrow(config.ResultsNodeId != InvalidNodeId, "Configuration's results node is not set.");
1439ErrorUtilities.VerifyThrow(
1595ErrorUtilities.ThrowInternalErrorUnreachable();
1617ErrorUtilities.VerifyThrow(inProcNodesToCreate == 1, "We should not be trying to create more than one inproc node");
1683ErrorUtilities.VerifyThrowArgumentNull(blockedRequest);
1684ErrorUtilities.VerifyThrowArgumentNull(blocker);
1742ErrorUtilities.VerifyThrowArgumentNull(blocker);
1743ErrorUtilities.VerifyThrowArgumentNull(responses);
1822ErrorUtilities.VerifyThrowInternalError(
1911ErrorUtilities.VerifyThrow(request.Parent == null, "Unexpectedly generated a SubmissionComplete response for a request which is not top-level.");
2110ErrorUtilities.VerifyThrow(
2185ErrorUtilities.VerifyThrow(parentRequestNode != InvalidNodeId, "Invalid parent node provided.");
2188ErrorUtilities.VerifyThrow(result.ParentGlobalRequestId == requestWhichGeneratedResult.ParentGlobalRequestId, "Result's parent doesn't match request's parent.");
2247ErrorUtilities.VerifyThrow(request.ConfigurationId != BuildRequestConfiguration.InvalidConfigurationId, "Requests should have a valid configuration id at this point");
BackEnd\Components\Scheduler\SchedulingData.cs (15)
281ErrorUtilities.VerifyThrow(_buildHierarchy.ContainsKey(parent), "Parent doesn't exist in build hierarchy for request {0}", request.BuildRequest.GlobalRequestId);
305ErrorUtilities.ThrowInternalError("Should not be updating a request after it has reached the Completed state.");
333ErrorUtilities.VerifyThrow(!requestsAssignedToNode.Contains(request), "Request {0} is already scheduled to node {1}", request.BuildRequest.GlobalRequestId, request.AssignedNode);
357ErrorUtilities.VerifyThrow(!_blockedRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already blocked!");
362ErrorUtilities.VerifyThrow(!_yieldingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already yielded!");
367ErrorUtilities.VerifyThrow(_configurationToRequests.ContainsKey(request.BuildRequest.ConfigurationId), "Configuration {0} never had requests assigned to it.", request.BuildRequest.ConfigurationId);
368ErrorUtilities.VerifyThrow(_configurationToRequests[request.BuildRequest.ConfigurationId].Count > 0, "Configuration {0} has no requests assigned to it.", request.BuildRequest.ConfigurationId);
379ErrorUtilities.VerifyThrow(!_executingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already executing!");
380ErrorUtilities.VerifyThrow(!_executingRequestByNode.ContainsKey(request.AssignedNode) || _executingRequestByNode[request.AssignedNode] == null, "Node {0} is currently executing a request.", request.AssignedNode);
393ErrorUtilities.VerifyThrow(!_readyRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already ready!");
402ErrorUtilities.VerifyThrow(!readyRequestsOnNode.Contains(request), "Request with global id {0} is already marked as ready on node {1}", request.BuildRequest.GlobalRequestId, request.AssignedNode);
407ErrorUtilities.ThrowInternalError("Request with global id {0} cannot transition to the Unscheduled state", request.BuildRequest.GlobalRequestId);
492ErrorUtilities.VerifyThrow(returnValue != null, "Global Request Id {0} has not been assigned and cannot be retrieved.", globalRequestId);
683ErrorUtilities.VerifyThrow(
728ErrorUtilities.ThrowInternalError("Request {0} was expected to be in state {1} but is not scheduled at all (it may be unscheduled or may be unknown to the system.)", globalRequestId, state);
BackEnd\Shared\BuildRequestConfiguration.cs (25)
172ErrorUtilities.VerifyThrowArgumentNull(data);
173ErrorUtilities.VerifyThrowInternalLength(data.ProjectFullPath, "data.ProjectFullPath");
214ErrorUtilities.VerifyThrowArgumentNull(instance);
234ErrorUtilities.VerifyThrow(configId != InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor.");
235ErrorUtilities.VerifyThrowArgumentNull(other);
236ErrorUtilities.VerifyThrow(other._transferredState == null, "Unexpected transferred state still set on other configuration.");
355ErrorUtilities.VerifyThrow((_configId == InvalidConfigurationId) || (WasGeneratedByNode && (value > InvalidConfigurationId)), "Configuration ID must be invalid, or it must be less than invalid and the new config must be greater than invalid. It was {0}, the new value was {1}.", _configId, value);
386ErrorUtilities.VerifyThrow(!IsCached, "We shouldn't be accessing the ProjectInstance when the configuration is cached.");
398ErrorUtilities.VerifyThrow(_transferredProperties == null, "Shouldn't be transferring entire state of ProjectInstance when transferredProperties is not null.");
418ErrorUtilities.VerifyThrow(project != null, "Cannot set null project.");
447ErrorUtilities.VerifyThrow(!IsLoaded, "Already loaded the project for this configuration id {0}.", ConfigurationId);
524ErrorUtilities.VerifyThrow(IsLoaded, $"This {nameof(BuildRequestConfiguration)} must be loaded at the end of this method");
551ErrorUtilities.VerifyThrow(_projectInitialTargets == null, "Initial targets cannot be reset once they have been set.");
567ErrorUtilities.VerifyThrow(_projectDefaultTargets == null, "Default targets cannot be reset once they have been set.");
582ErrorUtilities.VerifyThrow(
601ErrorUtilities.VerifyThrow(!IsCached, "Configuration is cached, we shouldn't be accessing the lookup.");
724ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e);
763ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e);
778ErrorUtilities.VerifyThrow(request.ConfigurationId == ConfigurationId, "Request does not match configuration.");
779ErrorUtilities.VerifyThrow(_projectInitialTargets != null, "Initial targets have not been set.");
780ErrorUtilities.VerifyThrow(_projectDefaultTargets != null, "Default targets have not been set.");
784ErrorUtilities.VerifyThrow(
822ErrorUtilities.VerifyThrowInternalNull(Project);
823ErrorUtilities.VerifyThrowInternalLength(referenceFullPath, nameof(referenceFullPath));
824ErrorUtilities.VerifyThrow(Path.IsPathRooted(referenceFullPath), "Method does not treat path normalization cases");
Construction\ProjectElementContainer.cs (31)
145ErrorUtilities.VerifyThrowArgumentNull(child);
176ErrorUtilities.VerifyThrow(child.NextSibling.PreviousSibling == reference, "Invalid structure");
200ErrorUtilities.VerifyThrowArgumentNull(child);
232ErrorUtilities.VerifyThrow(child.PreviousSibling.NextSibling == reference, "Invalid structure");
256ErrorUtilities.VerifyThrow(FirstChild != null, "Invalid structure");
275ErrorUtilities.VerifyThrow(LastChild != null, "Invalid structure");
295ErrorUtilities.VerifyThrowArgumentNull(child);
297ErrorUtilities.VerifyThrowArgument(child.Parent == this, "OM_NodeNotAlreadyParentedByThis");
354ErrorUtilities.VerifyThrowArgumentNull(element);
355ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
389ErrorUtilities.VerifyThrow(child.Parent == this, "Expected parent already set");
390ErrorUtilities.VerifyThrow(child.PreviousSibling == null && child.NextSibling == null, "Invalid structure");
391ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
441ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
458ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
474ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
494ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
609ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
651ErrorUtilities.VerifyThrow(FirstChild == null && LastChild == null, "Expecting no children");
684ErrorUtilities.VerifyThrowInvalidOperation(Parent != null || ContainingProject == this, "OM_ParentNotParented");
685ErrorUtilities.VerifyThrowInvalidOperation(reference == null || reference.Parent == this, "OM_ReferenceDoesNotHaveThisParent");
686ErrorUtilities.VerifyThrowInvalidOperation(child.Parent == null, "OM_NodeAlreadyParented");
687ErrorUtilities.VerifyThrowInvalidOperation(child.ContainingProject == ContainingProject, "OM_MustBeSameProject");
692ErrorUtilities.VerifyThrow(child.NextSibling == null || child.NextSibling.PreviousSibling != this, "Invalid structure");
693ErrorUtilities.VerifyThrow(child.PreviousSibling == null || child.PreviousSibling.NextSibling != this, "Invalid structure");
707ErrorUtilities.VerifyThrowInvalidOperation(ancestor != element, "OM_SelfAncestor");
839public void Add(T item) => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
841public void Clear() => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
847ErrorUtilities.VerifyThrowArgumentNull(array);
866ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
878ErrorUtilities.VerifyThrowArgumentNull(array);
Construction\ProjectItemElement.cs (21)
68ErrorUtilities.VerifyThrowArgumentNull(parent);
105ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
127ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Remove.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.remove);
128ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Update.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.update);
149ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Include.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
168ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Include.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update);
189ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement || Parent.Parent is ProjectRootElement, "OM_NoMatchOnMetadataOutsideTargets");
191ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length != 0, "OM_MatchOnMetadataOnlyApplicableToRemoveItems", ElementName, XMakeAttributes.matchOnMetadata);
211ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || MatchOnMetadata.Length != 0, "OM_MatchOnMetadataOptionsOnlyApplicableToItemsWithMatchOnMetadata", ElementName, XMakeAttributes.matchOnMetadataOptions);
231ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepMetadataOutsideTargets");
232ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.removeMetadata, XMakeAttributes.keepMetadata);
252ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoRemoveMetadataOutsideTargets");
253ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || KeepMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.keepMetadata, XMakeAttributes.removeMetadata);
273ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepDuplicatesOutsideTargets");
397ErrorUtilities.VerifyThrowArgumentLength(name);
398ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
430ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemType), "CannotModifyReservedItem", itemType);
447ErrorUtilities.VerifyThrowArgumentLength(newItemType);
449ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newItemType), "CannotModifyReservedItem", newItemType);
480ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectTargetElement || (Include.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove");
481ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectRootElement || parent.Parent is ProjectTargetElement || parent.Parent is ProjectWhenElement || parent.Parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskElement.cs (8)
34ErrorUtilities.VerifyThrowArgumentNull(parent);
56ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.assemblyName);
57ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyName), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName);
73ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.assemblyName);
74ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyFile), "OM_EitherAttributeButNotBoth", XMakeElements.usingTask, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName);
88ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.taskName);
234ErrorUtilities.VerifyThrowArgument(
268ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Definition\Project.cs (64)
117ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
118ErrorUtilities.VerifyThrowArgumentNull(link);
273ErrorUtilities.VerifyThrowArgumentNull(xml);
274ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
275ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
367ErrorUtilities.VerifyThrowArgumentNull(xmlReader);
368ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
369ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
463ErrorUtilities.VerifyThrowArgumentNull(projectFile);
464ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
465ErrorUtilities.VerifyThrowArgumentNull(projectCollection);
859ErrorUtilities.VerifyThrowArgumentNull(item);
869ErrorUtilities.VerifyThrowArgumentNull(item);
1086ErrorUtilities.VerifyThrowArgumentNull(metadatum);
1097ErrorUtilities.VerifyThrowArgumentNull(item);
1107ErrorUtilities.VerifyThrowArgumentNull(item);
1118ErrorUtilities.VerifyThrowArgumentNull(property);
1683ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}");
1803ErrorUtilities.VerifyThrow(!implementationInternal.IsZombified, "OM_ProjectIsNoLongerActive");
1814ErrorUtilities.VerifyThrowInternalNull(otherXml);
1815ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File);
1888ErrorUtilities.VerifyThrowArgumentNull(xml);
1889ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
1890ErrorUtilities.VerifyThrowArgumentNull(owner);
1912ErrorUtilities.VerifyThrowArgumentNull(xmlReader);
1913ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
1914ErrorUtilities.VerifyThrowArgumentNull(owner);
1947ErrorUtilities.VerifyThrowArgumentNull(projectFile);
1948ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
1949ErrorUtilities.VerifyThrowArgumentNull(owner);
2241ErrorUtilities.ThrowInvalidOperation("OM_NotEvaluatedBecauseShouldEvaluateForDesignTimeIsFalse", nameof(ItemsIgnoringCondition));
2283ErrorUtilities.VerifyThrowInvalidOperation((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0, "OM_MustSetRecordDuplicateInputs");
2462ErrorUtilities.ThrowInternalErrorUnreachable();
2860ErrorUtilities.ThrowInternalErrorUnreachable();
2947ErrorUtilities.VerifyThrowArgumentLength(name);
2948ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
2952ErrorUtilities.VerifyThrowInvalidOperation(property?.IsReservedProperty != true, "OM_ReservedName", name);
2953ErrorUtilities.VerifyThrowInvalidOperation(property?.IsGlobalProperty != true, "OM_GlobalProperty", name);
3075ErrorUtilities.VerifyThrowArgumentLength(itemType);
3076ErrorUtilities.VerifyThrowArgumentLength(unevaluatedInclude);
3175ErrorUtilities.VerifyThrowArgumentNull(property);
3176ErrorUtilities.VerifyThrowInvalidOperation(!property.IsReservedProperty, "OM_ReservedName", property.Name);
3177ErrorUtilities.VerifyThrowInvalidOperation(!property.IsGlobalProperty, "OM_GlobalProperty", property.Name);
3178ErrorUtilities.VerifyThrowArgument(property.Xml.Parent != null, "OM_IncorrectObjectAssociation", "ProjectProperty", "Project");
3202ErrorUtilities.VerifyThrowArgumentLength(name);
3237ErrorUtilities.VerifyThrowArgumentNull(item);
3238ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project");
3257ErrorUtilities.VerifyThrowArgumentNull(items);
3280ErrorUtilities.VerifyThrowArgumentNull(unexpandedValue);
3418ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}");
3577ErrorUtilities.VerifyThrow(_data.Expander.Metadata == null, "Should be null");
3604ErrorUtilities.VerifyThrowInternalNull(otherXml);
3605ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File);
3656ErrorUtilities.VerifyThrowArgumentNull(item);
3665ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project");
3756ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
3777ErrorUtilities.VerifyThrow(!IsDirty, "Should not be dirty now");
3824ErrorUtilities.VerifyThrow(LastEvaluationId == BuildEventContext.InvalidEvaluationId, "This is the first evaluation therefore the last evaluation id is invalid");
3828ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Last evaluation ID must be valid after the first evaluation");
4413ErrorUtilities.VerifyThrowInternalNull(property);
4425ErrorUtilities.VerifyThrowInternalNull(itemDefinitionMetadatum);
4437ErrorUtilities.VerifyThrowInternalNull(item);
4579ErrorUtilities.ThrowInternalErrorUnreachable();
4673ErrorUtilities.VerifyThrowArgumentLength(name);
Definition\ProjectCollection.cs (16)
547ErrorUtilities.VerifyThrow(_defaultToolsVersion != null, "Should have a default");
554ErrorUtilities.VerifyThrowArgumentLength(value, nameof(DefaultToolsVersion));
562ErrorUtilities.ThrowInvalidOperation("UnrecognizedToolsVersion", value, toolsVersionList);
1075ErrorUtilities.VerifyThrowArgumentNull(toolset);
1091ErrorUtilities.VerifyThrowArgumentLength(toolsVersion);
1135ErrorUtilities.VerifyThrowArgumentLength(toolsVersion);
1222ErrorUtilities.VerifyThrowArgumentLength(fileName);
1413ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded");
1444ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
1455ErrorUtilities.ThrowInvalidOperation("OM_ProjectXmlCannotBeUnloadedDueToLoadedProjects", projectRootElement.FullPath, conflictingProject.FullPath);
1594ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
1642ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded");
1673ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(project.ProjectCollection, this), "OM_IncorrectObjectAssociation", "Project", "ProjectCollection");
1733ErrorUtilities.VerifyThrowArgumentNull(logger);
1814ErrorUtilities.ThrowInternalError("Throwing from logger shutdown", ex);
2018ErrorUtilities.ThrowInvalidOperation("OM_MatchingProjectAlreadyInCollection", existing.FullPath);
Definition\ProjectItem.cs (19)
130ErrorUtilities.VerifyThrowInternalNull(project);
131ErrorUtilities.VerifyThrowArgumentNull(xml);
134ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeEscaped);
135ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeBeforeWildcardExpansionEscaped);
410ErrorUtilities.VerifyThrowArgumentLength(name);
476ErrorUtilities.VerifyThrowArgumentLength(name);
581ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
582ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
583ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
638ErrorUtilities.VerifyThrowArgumentLength(name);
639ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
641ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
648ErrorUtilities.VerifyThrowInvalidOperation(itemDefinitionMetadata == null, "OM_CannotRemoveMetadataOriginatingFromItemDefinition", name);
691ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
785ErrorUtilities.VerifyThrowArgumentLength(newItemType, "ItemType");
787ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
933set { ErrorUtilities.ThrowInternalError("Cannot change the item type on ProjectItem.ProjectItemFactory"); }
1008ErrorUtilities.VerifyThrowInternalNull(_xml, "xml");
1032ErrorUtilities.VerifyThrowInternalNull(_xml, "xml");
Definition\ProjectProperty.cs (14)
43ErrorUtilities.VerifyThrowArgumentNull(project);
52ErrorUtilities.VerifyThrowArgumentNull(project);
53ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped);
362ErrorUtilities.VerifyThrowArgumentNull(xml);
363ErrorUtilities.VerifyThrowInvalidOperation(!ProjectHasMatchingGlobalProperty(project, xml.Name), "OM_GlobalProperty", xml.Name);
405ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
507ErrorUtilities.VerifyThrowArgumentNull(predecessor);
547ErrorUtilities.VerifyThrowArgumentLength(name);
548ErrorUtilities.VerifyThrowInvalidOperation(isGlobalProperty || !ProjectHasMatchingGlobalProperty(project, name), "OM_GlobalProperty", name);
549ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name);
550ErrorUtilities.VerifyThrowArgument(mayBeReserved || !ReservedPropertyNames.IsReservedProperty(name), "OM_ReservedName", name);
591ErrorUtilities.VerifyThrowInvalidOperation(!IsReservedProperty, "OM_ReservedName", _name);
592ErrorUtilities.VerifyThrowInvalidOperation(!IsGlobalProperty, "OM_GlobalProperty", _name);
606ErrorUtilities.ThrowInternalErrorUnreachable();
Evaluation\Expander.cs (17)
251ErrorUtilities.VerifyThrowObjectDisposed(!_disposed, nameof(SpanBasedConcatenator));
499ErrorUtilities.VerifyThrowInternalNull(elementLocation);
520ErrorUtilities.VerifyThrowInternalNull(elementLocation);
534ErrorUtilities.VerifyThrow((options & ExpanderOptions.BreakOnNotEmpty) == 0, "not supported");
568ErrorUtilities.VerifyThrowInternalNull(elementLocation);
642ErrorUtilities.VerifyThrowInternalNull(elementLocation);
983ErrorUtilities.VerifyThrow(metadata != null, "Cannot expand metadata without providing metadata");
1153ErrorUtilities.VerifyThrow(options != ExpanderOptions.Invalid, "Must be expanding metadata of some kind");
1161ErrorUtilities.VerifyThrow(itemMetadataMatch.Success, "Need a valid item metadata.");
1285ErrorUtilities.VerifyThrow(properties != null, "Cannot expand properties without providing properties");
2122ErrorUtilities.VerifyThrow(!matchesEnumerator.MoveNext(), "Expected just one item vector");
2133ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items");
2251ErrorUtilities.VerifyThrow(evaluatedItems != null, "Cannot expand items without providing items");
2334ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items");
4265ErrorUtilities.ThrowArgument("CouldNotDifferentiateBetweenCompatibleMethods", _methodMethodName, args.Length);
4309ErrorUtilities.VerifyThrow(cachedTypeInformation.Item1 != null || cachedTypeInformation.Item2 != null, "Function type information needs either string or type represented.");
4327ErrorUtilities.VerifyThrowInternalNull(receiverType, $"Type information for {typeName} was present in the allowlist cache as {assemblyQualifiedTypeName} but the type could not be loaded.");
Evaluation\IntrinsicFunctions.cs (3)
494ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", runtime, "Runtime", XMakeAttributes.MSBuildRuntimeValues.clr2, XMakeAttributes.MSBuildRuntimeValues.clr4, XMakeAttributes.MSBuildRuntimeValues.currentRuntime, XMakeAttributes.MSBuildRuntimeValues.any);
499ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", architecture, "Architecture", XMakeAttributes.MSBuildArchitectureValues.x86, XMakeAttributes.MSBuildArchitectureValues.x64, XMakeAttributes.MSBuildArchitectureValues.currentArchitecture, XMakeAttributes.MSBuildArchitectureValues.any);
816ErrorUtilities.ThrowArgument(keyName);
Instance\ProjectInstance.cs (41)
304ErrorUtilities.VerifyThrowArgumentLength(projectFile);
305ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
378ErrorUtilities.VerifyThrowInternalNull(project);
431ErrorUtilities.VerifyThrowInternalNull(linkedProject);
647ErrorUtilities.VerifyThrowArgumentLength(projectFile);
648ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
649ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
663ErrorUtilities.VerifyThrowArgumentNull(xml);
664ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
665ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
675ErrorUtilities.VerifyThrowInternalNull(data);
676ErrorUtilities.VerifyThrowInternalLength(directory, nameof(directory));
677ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(fullPath, nameof(fullPath));
741ErrorUtilities.VerifyThrow(filter == null || isImmutable,
1543ErrorUtilities.ThrowInternalErrorUnreachable();
1697ErrorUtilities.VerifyThrowArgumentNull(item);
1707ErrorUtilities.VerifyThrowArgumentNull(item);
1717ErrorUtilities.VerifyThrowArgumentNull(metadatum);
1728ErrorUtilities.VerifyThrowArgumentNull(item);
1738ErrorUtilities.VerifyThrowArgumentNull(item);
1749ErrorUtilities.VerifyThrowArgumentNull(property);
1803ErrorUtilities.ThrowInternalErrorUnreachable();
1830ErrorUtilities.ThrowInternalErrorUnreachable();
1844ErrorUtilities.ThrowInternalErrorUnreachable();
1858ErrorUtilities.ThrowInternalErrorUnreachable();
2440ErrorUtilities.VerifyThrow(ProjectRootElementCache == null, $"{nameof(ProjectRootElementCache)} is already set. Cannot set again");
2441ErrorUtilities.VerifyThrow(_hostServices == null, $"{nameof(HostServices)} is already set. Cannot set again");
2442ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation.");
2634ErrorUtilities.VerifyThrowArgumentLength(projectFile);
2635ErrorUtilities.VerifyThrowArgumentNull(globalPropertiesInstances);
2636ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
2637ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
2638ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(projectFile), "Project file {0} is not a solution.", projectFile);
2773ErrorUtilities.ThrowInvalidOperation("OM_ProjectInstanceImmutable");
2915ErrorUtilities.VerifyThrowInternalLength(targetName, nameof(targetName));
2916ErrorUtilities.VerifyThrow(!_actualTargets.ContainsKey(targetName), "Target {0} already exists.", targetName);
3188ErrorUtilities.VerifyThrowArgumentNull(xml);
3189ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(explicitToolsVersion, "toolsVersion");
3190ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
3271ErrorUtilities.VerifyThrow(EvaluationId == BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation");
3294ErrorUtilities.VerifyThrow(EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
Instance\ProjectItemInstance.cs (18)
205ErrorUtilities.VerifyThrowArgumentLength(value, "EvaluatedInclude");
737ErrorUtilities.VerifyThrowArgumentNull(projectToUse, "project");
738ErrorUtilities.VerifyThrowArgumentLength(itemTypeToUse, "itemType");
740ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemTypeToUse), "OM_ReservedName", itemTypeToUse);
866ErrorUtilities.VerifyThrowArgumentLength(includeEscaped);
867ErrorUtilities.VerifyThrowArgumentLength(includeBeforeWildcardExpansionEscaped);
936ErrorUtilities.VerifyThrowArgumentNull(value, "ItemSpec");
1058ErrorUtilities.VerifyThrowArgumentLength(value, "IncludeEscaped");
1388ErrorUtilities.ThrowInternalErrorUnreachable();
1397ErrorUtilities.ThrowInternalErrorUnreachable();
1423ErrorUtilities.VerifyThrowArgumentLength(metadataName);
1512ErrorUtilities.VerifyThrowArgumentNull(destinationItem);
2222ErrorUtilities.VerifyThrowInternalLength(itemType, nameof(itemType));
2252ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType");
2285ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType");
2314ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType");
2315ErrorUtilities.VerifyThrowInternalNull(source);
2464ErrorUtilities.ThrowInternalErrorUnreachable();
Logging\ParallelLogger\ParallelConsoleLogger.cs (15)
514ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
515ErrorUtilities.VerifyThrowArgumentNull(e.ParentProjectBuildEventContext, "ParentProjectBuildEventContext");
654ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
658ErrorUtilities.VerifyThrow(startedEvent != null, "Project finished event for {0} received without matching start event", e.ProjectFile);
845ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
866ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
883ErrorUtilities.VerifyThrow(startedEvent != null, "Started event should not be null in the finished event handler");
938ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
979ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
1029ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
1075ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
1133ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
1432ErrorUtilities.VerifyThrow(startedEvent != null, "Project Started should not be null in deferred target started");
1563ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext");
1727ErrorUtilities.VerifyThrow(_startedEvent != null, "Cannot have finished counter without started counter. ");
NodeEndpointOutOfProcBase.cs (9)
172ErrorUtilities.VerifyThrow(_status == LinkStatus.Inactive, "Link not inactive. Status is {0}", _status);
173ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory));
185ErrorUtilities.ThrowInternalError("Connect() not valid on the out of proc endpoint.");
292ErrorUtilities.VerifyThrow(_status != newStatus, "Attempting to change status to existing status {0}.", _status);
315ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
332ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet));
333ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null");
334ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null");
801ErrorUtilities.ThrowInternalError("waitId {0} out of range.", waitId);
TaskLoggingHelper.cs (39)
52ErrorUtilities.VerifyThrowArgumentNull(taskInstance);
62ErrorUtilities.VerifyThrowArgumentNull(buildEngine);
63ErrorUtilities.VerifyThrowArgumentLength(taskName);
181ErrorUtilities.VerifyThrowArgumentNull(message);
205ErrorUtilities.VerifyThrowArgumentNull(resourceName);
206ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName);
210ErrorUtilities.VerifyThrowArgument(resourceString != null, "Shared.TaskResourceNotFound", resourceName, TaskName);
225ErrorUtilities.VerifyThrowArgumentNull(unformatted);
294ErrorUtilities.VerifyThrowArgumentNull(message);
321ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message);
330ErrorUtilities.VerifyThrow(errorCode == null, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message);
364ErrorUtilities.VerifyThrowArgumentNull(message);
374ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
426ErrorUtilities.VerifyThrowArgumentNull(message);
431ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
490ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
503ErrorUtilities.VerifyThrow(errorCode == null, errorCode, FormatResourceString(messageResourceName, messageArgs));
514ErrorUtilities.VerifyThrowArgumentNull(filePath);
515ErrorUtilities.VerifyThrowArgumentNull(content);
605ErrorUtilities.VerifyThrowArgumentNull(commandLine);
619ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message);
701ErrorUtilities.VerifyThrowArgumentNull(message);
706ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
778ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
795ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
861ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
929ErrorUtilities.VerifyThrowArgumentNull(exception);
1023ErrorUtilities.VerifyThrowArgumentNull(message);
1028ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
1119ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
1134ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
1200ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
1252ErrorUtilities.VerifyThrowArgumentNull(exception);
1294ErrorUtilities.VerifyThrowArgumentNull(fileName);
1321ErrorUtilities.VerifyThrowArgumentNull(stream);
1349ErrorUtilities.VerifyThrowArgumentNull(lineOfText);
1407ErrorUtilities.ThrowInternalError("Impossible canonical part.");
1549ErrorUtilities.VerifyThrowArgumentNull(exception);
1550ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);