BackEnd\BuildManager\BuildManager.cs (22)
297ErrorUtilities.VerifyThrowArgumentNull(hostName);
913ErrorUtilities.VerifyThrow(configuration.Project != null, "Configuration should have been loaded.");
946ErrorUtilities.VerifyThrowArgumentNull(requestData);
1032ErrorUtilities.VerifyThrow(_buildSubmissions.Count == 0, "All submissions not yet complete.");
1033ErrorUtilities.VerifyThrow(_activeNodes.Count == 0, "All nodes not yet shut down.");
1313ErrorUtilities.VerifyThrowArgumentNull(submission);
1314ErrorUtilities.VerifyThrow(!submission.IsCompleted, "Submission already complete.");
1330ErrorUtilities.VerifyThrowArgument(
1353ErrorUtilities.VerifyThrow(
1427ErrorUtilities.VerifyThrow(resolvedConfiguration is not null, "Cannot call project cache without having BuildRequestConfiguration");
1548ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(config.ProjectFullPath), "{0} is not a solution", config.ProjectFullPath);
1720ErrorUtilities.ThrowInternalError("Unexpected packet received by BuildManager: {0}", packet.Type);
2044ErrorUtilities.VerifyThrow(
2195ErrorUtilities.ThrowInvalidOperation(exceptionResouorce);
2204ErrorUtilities.VerifyThrowInvalidOperation(_buildManagerState == requiredState, exceptionResouorce);
2214ErrorUtilities.ThrowInternalError("Expected state {0}, actual state {1}", requiredState, _buildManagerState);
2556ErrorUtilities.VerifyThrow(_activeNodes.Contains(node), "Unexpected shutdown from node {0} which shouldn't exist.", node);
2759ErrorUtilities.ThrowInternalError("Scheduling action {0} not handled.", response.Action);
3193ErrorUtilities.ThrowInternalError("Incorrect packet type: {0} should have been {1}", packet.Type, expectedType);
3280ErrorUtilities.VerifyThrowInternalNull(inputCacheFiles);
3281ErrorUtilities.VerifyThrow(_configCache == null, "caches must not be set at this point");
3282ErrorUtilities.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)
200ErrorUtilities.VerifyThrow(_componentHost != null, "BuildRequestEngine not initialized by component host.");
201ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Uninitialized, "Engine must be in the Uninitiailzed state, but is {0}", _status);
226ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Active || _status == BuildRequestEngineStatus.Idle || _status == BuildRequestEngineStatus.Waiting, "Engine must be Active, Idle or Waiting to clean up, but is {0}.", _status);
228ErrorUtilities.VerifyThrow(_nodeLoggingContext != null, "Node logging context not set.");
315ErrorUtilities.ThrowInternalError("Failure during engine shutdown. Exception: {0}", e.ToString());
346ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status.Box());
349ErrorUtilities.VerifyThrow(!_requestsByGlobalRequestId.ContainsKey(request.GlobalRequestId), "Request {0} is already known to the engine.", request.GlobalRequestId);
350ErrorUtilities.VerifyThrow(_configCache.HasConfiguration(request.ConfigurationId), "Request {0} refers to configuration {1} which is not known to the engine.", request.GlobalRequestId, request.ConfigurationId);
417ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status.Box());
418ErrorUtilities.VerifyThrow(_requestsByGlobalRequestId.ContainsKey(unblocker.BlockedRequestId), "Request {0} is not known to the engine.", unblocker.BlockedRequestId);
522ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status.Box());
525ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
615ErrorUtilities.VerifyThrowArgumentNull(host);
616ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!");
633ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Uninitialized, "Cleanup wasn't called, status is {0}", _status);
646ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestEngine, "Cannot create component of type {0}", type);
755ErrorUtilities.VerifyThrow(activeEntry == null, "Multiple active requests");
781ErrorUtilities.ThrowInternalError("Unexpected BuildRequestEntry state " + currentEntry.State);
936ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
1136ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
1317ErrorUtilities.VerifyThrow((requestsToIssue == null) || (requestsToIssue.Count == 0), "Entry shouldn't be ready if we also issued requests.");
1370ErrorUtilities.VerifyThrow(config.WasGeneratedByNode, "InvalidConfigurationId");
1371ErrorUtilities.VerifyThrowArgumentNull(config);
1372ErrorUtilities.VerifyThrow(_unresolvedConfigurationsById.ContainsKey(config.ConfigurationId), "NoUnresolvedConfiguration");
1383ErrorUtilities.VerifyThrowArgumentNull(blocker);
1438ErrorUtilities.ThrowInternalError(e.Message, e);
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (24)
124ErrorUtilities.VerifyThrowArgumentNull(request);
125ErrorUtilities.VerifyThrowArgumentNull(requestConfiguration);
126ErrorUtilities.VerifyThrow(requestConfiguration.ConfigurationId == request.ConfigurationId, "Configuration id mismatch");
183ErrorUtilities.VerifyThrow(value == null || _requestBuilder == null, "Request Builder already set.");
194ErrorUtilities.VerifyThrow(configuration.WasGeneratedByNode, "Configuration has already been resolved.");
216ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active, "Must be in Active state to wait for blocking request. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
305ErrorUtilities.VerifyThrowArgumentNull(result);
310ErrorUtilities.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);
338ErrorUtilities.VerifyThrow(result.CircularDependency, "Received result for target in progress and it wasn't a circular dependency error.");
370ErrorUtilities.VerifyThrow(!_outstandingResults.ContainsKey(result.NodeRequestId), "Request already contains results.");
389ErrorUtilities.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);
390ErrorUtilities.VerifyThrow(_blockingGlobalRequestId != BuildRequest.InvalidGlobalRequestId, "Entry must be waiting on another request to be unblocked. Config: {0} Request: {1}", RequestConfiguration.ConfigurationId, Request.GlobalRequestId);
407ErrorUtilities.VerifyThrow(_unresolvedConfigurations == null, "All configurations must be resolved before Continue may be called.");
408ErrorUtilities.VerifyThrow(_outstandingRequests == null, "All outstanding requests must have been satisfied.");
409ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Ready, "Entry must be in the Ready state. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
478ErrorUtilities.VerifyThrowArgumentNull(result);
479ErrorUtilities.VerifyThrow(Result == null, "Entry already Completed.");
486ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active, "Entry must be active before it can be Completed successfully. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State);
487ErrorUtilities.VerifyThrow(_unresolvedConfigurations == null, "Entry must not have any unresolved configurations.");
488ErrorUtilities.VerifyThrow(_outstandingRequests == null, "Entry must have no outstanding requests.");
489ErrorUtilities.VerifyThrow(_outstandingResults == null, "Results must be consumed before request may be completed.");
504ErrorUtilities.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);
510ErrorUtilities.VerifyThrow(!_outstandingRequests.ContainsKey(newRequest.NodeRequestId), "Already waiting for local request {0}", newRequest.NodeRequestId);
515ErrorUtilities.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)
172ErrorUtilities.VerifyThrow(_nodeContexts.TryGetValue(nodeId, out NodeContext context), "Invalid host context specified: {0}.", nodeId);
316ErrorUtilities.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");
341ErrorUtilities.VerifyThrow(componentType == BuildComponentType.OutOfProcTaskHostNodeProvider, "Factory cannot create components of type {0}", componentType);
368ErrorUtilities.VerifyThrowInternalErrorUnreachable(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost));
410ErrorUtilities.VerifyThrowInternalErrorUnreachable(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost));
424ErrorUtilities.ThrowInternalError("ARM64 CLR2 task hosts are not supported.");
455ErrorUtilities.VerifyThrowInternalErrorUnreachable(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost));
480ErrorUtilities.ThrowInternalError(ResourceUtilities.GetResourceString("SDKPathResolution_Failed"));
485ErrorUtilities.ThrowInternalError(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("SDKPathCheck_Failed", path));
607ErrorUtilities.VerifyThrow(_nodeIdToPacketFactory.ContainsKey(nodeId) && _nodeIdToPacketHandler.ContainsKey(nodeId), "Why are we trying to disconnect from a context that we already disconnected from? Did we call DisconnectFromHost twice?");
618ErrorUtilities.VerifyThrowArgumentNull(factory);
619ErrorUtilities.VerifyThrow(!_nodeIdToPacketFactory.ContainsKey(taskHostNodeId), "We should not already have a factory for this context! Did we forget to call DisconnectFromHost somewhere?");
BackEnd\Components\Logging\LoggingService.cs (19)
872ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
873ErrorUtilities.VerifyThrow(buildComponentHost != null, "BuildComponentHost was null");
911ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
981ErrorUtilities.VerifyThrow(packet != null, "packet was null");
987ErrorUtilities.ThrowInternalError("Expected packet type \"{0}\" but instead got packet type \"{1}\".", nameof(NodePacketType.LogMessage), packet.Type.ToString());
993ErrorUtilities.VerifyThrow(loggingPacket.EventType != LoggingEventType.CustomEvent, "Custom event types are no longer supported. Does the sending node have a different version?");
1010ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1011ErrorUtilities.VerifyThrow(logger != null, "logger was null");
1099ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1100ErrorUtilities.VerifyThrow(forwardingLogger != null, "forwardingLogger was null");
1166ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component");
1167ErrorUtilities.VerifyThrow(forwardingLoggerSink != null, "forwardingLoggerSink was null");
1168ErrorUtilities.VerifyThrow(descriptions != null, "loggerDescriptions was null");
1169ErrorUtilities.VerifyThrow(descriptions.Count > 0, "loggerDescriptions was null");
1221ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
1275ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
1325ErrorUtilities.VerifyThrow(_configCache.Value.HasConfiguration(projectStartedEventArgs.ProjectId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node.");
1549ErrorUtilities.ThrowInternalError("Unknown logging item in queue:" + loggingEvent.GetType().FullName);
1931ErrorUtilities.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 (9)
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.");
808ErrorUtilities.VerifyThrowInternalNull(requestConfiguration.Project, nameof(requestConfiguration.Project));
875ErrorUtilities.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!");
1040ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.Contains(item), "Item should not be in table");
1055ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.ContainsKey(item), "Item should not be in table");
1086ErrorUtilities.VerifyThrow(_lookupScopes.Parent != null, "Operation in outer scope not supported");
1261ErrorUtilities.VerifyThrowInternalNull(value, "value");
1319ErrorUtilities.VerifyThrow(modificationType != ModificationType.Update, "Modification type may only be update when a value is specified.");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (43)
200ErrorUtilities.VerifyThrowArgumentNull(loggingContext);
201ErrorUtilities.VerifyThrowArgumentNull(entry);
202ErrorUtilities.VerifyThrow(_componentHost != null, "Host not set.");
203ErrorUtilities.VerifyThrow(_targetBuilder == null, "targetBuilder not null");
204ErrorUtilities.VerifyThrow(_nodeLoggingContext == null, "nodeLoggingContext not null");
205ErrorUtilities.VerifyThrow(_requestEntry == null, "requestEntry not null");
206ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Cancel already called");
226ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building");
227ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated");
228ErrorUtilities.VerifyThrow(!_continueEvent.WaitOne(0), "Request already continued");
232ErrorUtilities.VerifyThrow(_blockType == BlockType.BlockedOnTargetInProgress || _blockType == BlockType.Yielded || (_continueResults != null), "Unexpected null results for request {0} (nr {1})", _requestEntry.Request.GlobalRequestId, _requestEntry.Request.NodeRequestId);
243ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building");
244ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated");
245ErrorUtilities.VerifyThrow(!_pendingResourceRequests.IsEmpty, "No pending resource requests");
307ErrorUtilities.ThrowInvalidOperation("UnableToCancel");
336ErrorUtilities.VerifyThrowArgumentNull(projectFiles);
337ErrorUtilities.VerifyThrowArgumentNull(properties);
338ErrorUtilities.VerifyThrowArgumentNull(targets);
339ErrorUtilities.VerifyThrowArgumentNull(toolsVersions);
340ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set");
341ErrorUtilities.VerifyThrow(projectFiles.Length == properties.Length, "Properties and project counts not the same");
342ErrorUtilities.VerifyThrow(projectFiles.Length == toolsVersions.Length, "Tools versions and project counts not the same");
385ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests");
475ErrorUtilities.VerifyThrow(!_inMSBuildCallback, "Already in an MSBuild callback!");
485ErrorUtilities.VerifyThrow(_inMSBuildCallback, "Not in an MSBuild callback!");
494ErrorUtilities.VerifyThrow(Monitor.IsEntered(monitorLockObject), "Not running under the given lock");
554ErrorUtilities.VerifyThrowArgumentNull(host);
555ErrorUtilities.VerifyThrow(_componentHost == null, "RequestBuilder already initialized.");
631ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestBuilder, "Cannot create components of type {0}", type);
640ErrorUtilities.VerifyThrow(_requestTask == null, "Already have a task.");
682ErrorUtilities.VerifyThrow(_componentHost.LegacyThreadingData.MainThreadSubmissionId != _requestEntry.Request.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request.");
747ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Ready, "Entry is not in the Ready state, it is in the {0} state.", _requestEntry.State);
755ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Active, "Entry is not in the Active state, it is in the {0} state.", _requestEntry.State);
763ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Active || _requestEntry.State == BuildRequestEntryState.Waiting,
856ErrorUtilities.ThrowInternalError(ex.Message, ex);
866ErrorUtilities.VerifyThrow(result == null, "Result already set when exception was thrown.");
1000ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests");
1018ErrorUtilities.VerifyThrow(!isContinue, "Unexpected null results during continue");
1096ErrorUtilities.VerifyThrow(_targetBuilder != null, "Target builder is null");
1207ErrorUtilities.VerifyThrow(
1410ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedCurrentDirectory != null, "Current directory not previously saved.");
1411ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedEnvironmentVariables != null, "Current environment not previously saved.");
1466ErrorUtilities.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);
421ErrorUtilities.VerifyThrow(!_isExecuting, "Target {0} is already executing", _target.Name);
699ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes.");
746ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes.");
771ErrorUtilities.VerifyThrow(_state != TargetEntryState.Completed, "State must not be Completed. State is {0}.", _state);
782ErrorUtilities.VerifyThrow(_state == TargetEntryState.Completed, "State must be Completed. State is {0}.", _state);
783ErrorUtilities.VerifyThrow(_targetResult.ResultCode == TargetResultCode.Skipped, "ResultCode must be Skipped. ResultCode is {0}.", _state);
784ErrorUtilities.VerifyThrow(_targetResult.WorkUnitResult.ActionCode == WorkUnitActionCode.Continue, "ActionCode must be Continue. ActionCode is {0}.", _state);
888ErrorUtilities.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)
360ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
365ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
374ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should exist");
386ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target");
432ErrorUtilities.VerifyThrow(result.ParentGlobalRequestId == request.Parent.BuildRequest.GlobalRequestId, "Result's parent doesn't match request's parent.");
550ErrorUtilities.ThrowInternalErrorUnreachable();
696ErrorUtilities.VerifyThrow(componentType == BuildComponentType.Scheduler, "Cannot create components of type {0}", componentType);
803ErrorUtilities.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);
810ErrorUtilities.ThrowInternalError("None of the {0} blocked requests can be serviced by currently existing nodes, but we aren't requesting a new one.", _schedulingData.BlockedRequestsCount);
816ErrorUtilities.ThrowInternalError("Somehow we have {0} requests which are ready to go but we didn't tell the nodes to continue.", _schedulingData.ReadyRequestsCount);
821ErrorUtilities.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);
826ErrorUtilities.VerifyThrow(responses.Count > 0, "We failed to request a node to be created.");
1410ErrorUtilities.VerifyThrowArgumentNull(request);
1411ErrorUtilities.VerifyThrowArgumentNull(responses);
1412ErrorUtilities.VerifyThrow(nodeId != InvalidNodeId, "Invalid node id specified.");
1427ErrorUtilities.VerifyThrow(config.ResultsNodeId != InvalidNodeId, "Configuration's results node is not set.");
1440ErrorUtilities.VerifyThrow(
1596ErrorUtilities.ThrowInternalErrorUnreachable();
1618ErrorUtilities.VerifyThrow(inProcNodesToCreate == 1, "We should not be trying to create more than one inproc node");
1684ErrorUtilities.VerifyThrowArgumentNull(blockedRequest);
1685ErrorUtilities.VerifyThrowArgumentNull(blocker);
1743ErrorUtilities.VerifyThrowArgumentNull(blocker);
1744ErrorUtilities.VerifyThrowArgumentNull(responses);
1823ErrorUtilities.VerifyThrowInternalError(
1912ErrorUtilities.VerifyThrow(request.Parent == null, "Unexpectedly generated a SubmissionComplete response for a request which is not top-level.");
2111ErrorUtilities.VerifyThrow(
2186ErrorUtilities.VerifyThrow(parentRequestNode != InvalidNodeId, "Invalid parent node provided.");
2189ErrorUtilities.VerifyThrow(result.ParentGlobalRequestId == requestWhichGeneratedResult.ParentGlobalRequestId, "Result's parent doesn't match request's parent.");
2248ErrorUtilities.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)
171ErrorUtilities.VerifyThrowArgumentNull(data);
172ErrorUtilities.VerifyThrowInternalLength(data.ProjectFullPath, "data.ProjectFullPath");
213ErrorUtilities.VerifyThrowArgumentNull(instance);
233ErrorUtilities.VerifyThrow(configId != InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor.");
234ErrorUtilities.VerifyThrowArgumentNull(other);
235ErrorUtilities.VerifyThrow(other._transferredState == null, "Unexpected transferred state still set on other configuration.");
354ErrorUtilities.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);
385ErrorUtilities.VerifyThrow(!IsCached, "We shouldn't be accessing the ProjectInstance when the configuration is cached.");
397ErrorUtilities.VerifyThrow(_transferredProperties == null, "Shouldn't be transferring entire state of ProjectInstance when transferredProperties is not null.");
417ErrorUtilities.VerifyThrow(project != null, "Cannot set null project.");
446ErrorUtilities.VerifyThrow(!IsLoaded, "Already loaded the project for this configuration id {0}.", ConfigurationId);
523ErrorUtilities.VerifyThrow(IsLoaded, $"This {nameof(BuildRequestConfiguration)} must be loaded at the end of this method");
550ErrorUtilities.VerifyThrow(_projectInitialTargets == null, "Initial targets cannot be reset once they have been set.");
566ErrorUtilities.VerifyThrow(_projectDefaultTargets == null, "Default targets cannot be reset once they have been set.");
581ErrorUtilities.VerifyThrow(
600ErrorUtilities.VerifyThrow(!IsCached, "Configuration is cached, we shouldn't be accessing the lookup.");
723ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e);
762ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e);
777ErrorUtilities.VerifyThrow(request.ConfigurationId == ConfigurationId, "Request does not match configuration.");
778ErrorUtilities.VerifyThrow(_projectInitialTargets != null, "Initial targets have not been set.");
779ErrorUtilities.VerifyThrow(_projectDefaultTargets != null, "Default targets have not been set.");
783ErrorUtilities.VerifyThrow(
821ErrorUtilities.VerifyThrowInternalNull(Project);
822ErrorUtilities.VerifyThrowInternalLength(referenceFullPath, nameof(referenceFullPath));
823ErrorUtilities.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");
392ErrorUtilities.VerifyThrowArgumentLength(name);
393ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue);
425ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemType), "CannotModifyReservedItem", itemType);
442ErrorUtilities.VerifyThrowArgumentLength(newItemType);
444ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newItemType), "CannotModifyReservedItem", newItemType);
475ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectTargetElement || (Include.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove");
476ErrorUtilities.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)
546ErrorUtilities.VerifyThrow(_defaultToolsVersion != null, "Should have a default");
553ErrorUtilities.VerifyThrowArgumentLength(value, nameof(DefaultToolsVersion));
561ErrorUtilities.ThrowInvalidOperation("UnrecognizedToolsVersion", value, toolsVersionList);
1074ErrorUtilities.VerifyThrowArgumentNull(toolset);
1090ErrorUtilities.VerifyThrowArgumentLength(toolsVersion);
1134ErrorUtilities.VerifyThrowArgumentLength(toolsVersion);
1221ErrorUtilities.VerifyThrowArgumentLength(fileName);
1412ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded");
1443ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
1454ErrorUtilities.ThrowInvalidOperation("OM_ProjectXmlCannotBeUnloadedDueToLoadedProjects", projectRootElement.FullPath, conflictingProject.FullPath);
1593ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
1641ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded");
1672ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(project.ProjectCollection, this), "OM_IncorrectObjectAssociation", "Project", "ProjectCollection");
1732ErrorUtilities.VerifyThrowArgumentNull(logger);
1813ErrorUtilities.ThrowInternalError("Throwing from logger shutdown", ex);
2017ErrorUtilities.ThrowInvalidOperation("OM_MatchingProjectAlreadyInCollection", existing.FullPath);
Definition\ProjectItem.cs (19)
130ErrorUtilities.VerifyThrowInternalNull(project);
131ErrorUtilities.VerifyThrowArgumentNull(xml);
134ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeEscaped);
135ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeBeforeWildcardExpansionEscaped);
415ErrorUtilities.VerifyThrowArgumentLength(name);
481ErrorUtilities.VerifyThrowArgumentLength(name);
586ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
587ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
588ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
643ErrorUtilities.VerifyThrowArgumentLength(name);
644ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name);
646ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
653ErrorUtilities.VerifyThrowInvalidOperation(itemDefinitionMetadata == null, "OM_CannotRemoveMetadataOriginatingFromItemDefinition", name);
696ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
790ErrorUtilities.VerifyThrowArgumentLength(newItemType, "ItemType");
792ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
945set { ErrorUtilities.ThrowInternalError("Cannot change the item type on ProjectItem.ProjectItemFactory"); }
1020ErrorUtilities.VerifyThrowInternalNull(_xml, "xml");
1044ErrorUtilities.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)
246ErrorUtilities.VerifyThrowObjectDisposed(!_disposed, nameof(SpanBasedConcatenator));
494ErrorUtilities.VerifyThrowInternalNull(elementLocation);
515ErrorUtilities.VerifyThrowInternalNull(elementLocation);
529ErrorUtilities.VerifyThrow((options & ExpanderOptions.BreakOnNotEmpty) == 0, "not supported");
563ErrorUtilities.VerifyThrowInternalNull(elementLocation);
637ErrorUtilities.VerifyThrowInternalNull(elementLocation);
978ErrorUtilities.VerifyThrow(metadata != null, "Cannot expand metadata without providing metadata");
1148ErrorUtilities.VerifyThrow(options != ExpanderOptions.Invalid, "Must be expanding metadata of some kind");
1156ErrorUtilities.VerifyThrow(itemMetadataMatch.Success, "Need a valid item metadata.");
1280ErrorUtilities.VerifyThrow(properties != null, "Cannot expand properties without providing properties");
2113ErrorUtilities.VerifyThrow(!matchesEnumerator.MoveNext(), "Expected just one item vector");
2124ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items");
2242ErrorUtilities.VerifyThrow(evaluatedItems != null, "Cannot expand items without providing items");
2325ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items");
4194ErrorUtilities.ThrowArgument("CouldNotDifferentiateBetweenCompatibleMethods", _methodMethodName, args.Length);
4238ErrorUtilities.VerifyThrow(cachedTypeInformation.Item1 != null || cachedTypeInformation.Item2 != null, "Function type information needs either string or type represented.");
4256ErrorUtilities.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);
820ErrorUtilities.ThrowArgument(keyName);
FrameworkLocationHelper.cs (10)
668ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion);
678ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion);
703ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion);
713ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion);
1011ErrorUtilities.VerifyThrowArgumentNull(targetFrameworkRootPath);
1012ErrorUtilities.VerifyThrowArgumentNull(frameworkName);
1026ErrorUtilities.ThrowInvalidOperation("FrameworkLocationHelper.CouldNotGenerateReferenceAssemblyDirectory", targetFrameworkRootPath, frameworkName.ToString(), e.Message);
1040ErrorUtilities.VerifyThrowArgumentOutOfRange(numberOfLevelsToRemove > 0, nameof(numberOfLevelsToRemove));
1155ErrorUtilities.VerifyThrowArgument(VisualStudioSpecDict.Value.TryGetValue(version, out VisualStudioSpec spec), "FrameworkLocationHelper.UnsupportedVisualStudioVersion", version);
1161ErrorUtilities.VerifyThrowArgument(DotNetFrameworkSpecDict.Value.TryGetValue(version, out DotNetFrameworkSpec spec), "FrameworkLocationHelper.UnsupportedFrameworkVersion", version);
Instance\ProjectInstance.cs (41)
303ErrorUtilities.VerifyThrowArgumentLength(projectFile);
304ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
377ErrorUtilities.VerifyThrowInternalNull(project);
430ErrorUtilities.VerifyThrowInternalNull(linkedProject);
646ErrorUtilities.VerifyThrowArgumentLength(projectFile);
647ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
648ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
662ErrorUtilities.VerifyThrowArgumentNull(xml);
663ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
664ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
674ErrorUtilities.VerifyThrowInternalNull(data);
675ErrorUtilities.VerifyThrowInternalLength(directory, nameof(directory));
676ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(fullPath, nameof(fullPath));
740ErrorUtilities.VerifyThrow(filter == null || isImmutable,
1532ErrorUtilities.ThrowInternalErrorUnreachable();
1686ErrorUtilities.VerifyThrowArgumentNull(item);
1696ErrorUtilities.VerifyThrowArgumentNull(item);
1706ErrorUtilities.VerifyThrowArgumentNull(metadatum);
1717ErrorUtilities.VerifyThrowArgumentNull(item);
1727ErrorUtilities.VerifyThrowArgumentNull(item);
1738ErrorUtilities.VerifyThrowArgumentNull(property);
1792ErrorUtilities.ThrowInternalErrorUnreachable();
1819ErrorUtilities.ThrowInternalErrorUnreachable();
1833ErrorUtilities.ThrowInternalErrorUnreachable();
1847ErrorUtilities.ThrowInternalErrorUnreachable();
2429ErrorUtilities.VerifyThrow(ProjectRootElementCache == null, $"{nameof(ProjectRootElementCache)} is already set. Cannot set again");
2430ErrorUtilities.VerifyThrow(_hostServices == null, $"{nameof(HostServices)} is already set. Cannot set again");
2431ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation.");
2623ErrorUtilities.VerifyThrowArgumentLength(projectFile);
2624ErrorUtilities.VerifyThrowArgumentNull(globalPropertiesInstances);
2625ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion));
2626ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
2627ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(projectFile), "Project file {0} is not a solution.", projectFile);
2762ErrorUtilities.ThrowInvalidOperation("OM_ProjectInstanceImmutable");
2904ErrorUtilities.VerifyThrowInternalLength(targetName, nameof(targetName));
2905ErrorUtilities.VerifyThrow(!_actualTargets.ContainsKey(targetName), "Target {0} already exists.", targetName);
3177ErrorUtilities.VerifyThrowArgumentNull(xml);
3178ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(explicitToolsVersion, "toolsVersion");
3179ErrorUtilities.VerifyThrowArgumentNull(buildParameters);
3260ErrorUtilities.VerifyThrow(EvaluationId == BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation");
3283ErrorUtilities.VerifyThrow(EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
Instance\ProjectItemInstance.cs (18)
205ErrorUtilities.VerifyThrowArgumentLength(value, "EvaluatedInclude");
735ErrorUtilities.VerifyThrowArgumentNull(projectToUse, "project");
736ErrorUtilities.VerifyThrowArgumentLength(itemTypeToUse, "itemType");
738ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemTypeToUse), "OM_ReservedName", itemTypeToUse);
863ErrorUtilities.VerifyThrowArgumentLength(includeEscaped);
864ErrorUtilities.VerifyThrowArgumentLength(includeBeforeWildcardExpansionEscaped);
933ErrorUtilities.VerifyThrowArgumentNull(value, "ItemSpec");
1052ErrorUtilities.VerifyThrowArgumentLength(value, "IncludeEscaped");
1368ErrorUtilities.ThrowInternalErrorUnreachable();
1377ErrorUtilities.ThrowInternalErrorUnreachable();
1403ErrorUtilities.VerifyThrowArgumentLength(metadataName);
1492ErrorUtilities.VerifyThrowArgumentNull(destinationItem);
2209ErrorUtilities.VerifyThrowInternalLength(itemType, nameof(itemType));
2239ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType");
2272ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType");
2301ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType");
2302ErrorUtilities.VerifyThrowInternalNull(source);
2451ErrorUtilities.ThrowInternalErrorUnreachable();
InterningBinaryReader.cs (3)
14using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities;
126ErrorUtilities.ThrowInternalError("From calculating based on the memorystream, about to read n = {0}. length = {1}, rawPosition = {2}, readLength = {3}, stringLength = {4}, currPos = {5}.", n, length, rawPosition, readLength, stringLength, currPos);
141ErrorUtilities.ThrowInternalError("From getting the length out of BaseStream.Read directly, about to read n = {0}. readLength = {1}, stringLength = {2}, currPos = {3}", n, readLength, stringLength, currPos);
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. ");
Modifiers.cs (8)
186ErrorUtilities.VerifyThrow(itemSpec != null, "Need item-spec to modify.");
187ErrorUtilities.VerifyThrow(modifier != null, "Need modifier to apply to item-spec.");
218ErrorUtilities.VerifyThrow(FileUtilitiesRegex.StartsWithUncPattern(modifiedItemSpec),
279ErrorUtilities.VerifyThrow((modifiedItemSpec.Length > length) && IsSlash(modifiedItemSpec[length]),
287ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(modifiedItemSpec) && IsSlash(modifiedItemSpec[0]),
389ErrorUtilities.ThrowInternalError("\"{0}\" is not a valid item-spec modifier.", modifier);
398ErrorUtilities.ThrowInternalError("\"{0}\" is not a valid item-spec modifier.", modifier);
403ErrorUtilities.ThrowInvalidOperation("Shared.InvalidFilespecForTransform", modifier, itemSpec, e.Message);
NodeEndpointOutOfProcBase.cs (9)
170ErrorUtilities.VerifyThrow(_status == LinkStatus.Inactive, "Link not inactive. Status is {0}", _status);
171ErrorUtilities.VerifyThrowArgumentNull(factory, nameof(factory));
183ErrorUtilities.ThrowInternalError("Connect() not valid on the out of proc endpoint.");
289ErrorUtilities.VerifyThrow(_status != newStatus, "Attempting to change status to existing status {0}.", _status);
312ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread.");
333ErrorUtilities.VerifyThrowArgumentNull(packet, nameof(packet));
334ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null");
335ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null");
790ErrorUtilities.ThrowInternalError("waitId {0} out of range.", waitId);
TaskLoggingHelper.cs (39)
54ErrorUtilities.VerifyThrowArgumentNull(taskInstance);
64ErrorUtilities.VerifyThrowArgumentNull(buildEngine);
65ErrorUtilities.VerifyThrowArgumentLength(taskName);
183ErrorUtilities.VerifyThrowArgumentNull(message);
207ErrorUtilities.VerifyThrowArgumentNull(resourceName);
208ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName);
212ErrorUtilities.VerifyThrowArgument(resourceString != null, "Shared.TaskResourceNotFound", resourceName, TaskName);
227ErrorUtilities.VerifyThrowArgumentNull(unformatted);
296ErrorUtilities.VerifyThrowArgumentNull(message);
323ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message);
332ErrorUtilities.VerifyThrow(errorCode == null, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message);
366ErrorUtilities.VerifyThrowArgumentNull(message);
376ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
428ErrorUtilities.VerifyThrowArgumentNull(message);
433ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
492ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
505ErrorUtilities.VerifyThrow(errorCode == null, errorCode, FormatResourceString(messageResourceName, messageArgs));
516ErrorUtilities.VerifyThrowArgumentNull(filePath);
517ErrorUtilities.VerifyThrowArgumentNull(content);
607ErrorUtilities.VerifyThrowArgumentNull(commandLine);
621ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message);
703ErrorUtilities.VerifyThrowArgumentNull(message);
708ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
780ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
797ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
863ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
931ErrorUtilities.VerifyThrowArgumentNull(exception);
1025ErrorUtilities.VerifyThrowArgumentNull(message);
1030ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
1121ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
1136ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
1202ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);
1254ErrorUtilities.VerifyThrowArgumentNull(exception);
1296ErrorUtilities.VerifyThrowArgumentNull(fileName);
1323ErrorUtilities.VerifyThrowArgumentNull(stream);
1351ErrorUtilities.VerifyThrowArgumentNull(lineOfText);
1409ErrorUtilities.ThrowInternalError("Impossible canonical part.");
1551ErrorUtilities.VerifyThrowArgumentNull(exception);
1552ErrorUtilities.VerifyThrowArgumentNull(messageResourceName);