450 references to VerifyThrow
Microsoft.Build (447)
AssemblyLoadInfo.cs (4)
27ErrorUtilities.VerifyThrow((!string.IsNullOrEmpty(assemblyName)) || (!string.IsNullOrEmpty(assemblyFile)), 29ErrorUtilities.VerifyThrow((assemblyName == null) || (assemblyFile == null), 102ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 179ErrorUtilities.VerifyThrow(Path.IsPathRooted(assemblyFile), "Assembly file path should be rooted");
AssemblyNameExtension.cs (3)
327ErrorUtilities.VerifyThrow(!immutable, "Object is immutable cannot replace the version"); 384ErrorUtilities.VerifyThrow(extensionToAdd.Immutable, "ExtensionToAdd is not immutable"); 515ErrorUtilities.VerifyThrow(result == baselineResult, "Optimized version of CompareBaseNameTo didn't return the same result as the baseline.");
BackEnd\BuildManager\BuildManager.cs (9)
859ErrorUtilities.VerifyThrow(configuration.Project != null, "Configuration should have been loaded."); 978ErrorUtilities.VerifyThrow(_buildSubmissions.Count == 0, "All submissions not yet complete."); 979ErrorUtilities.VerifyThrow(_activeNodes.Count == 0, "All nodes not yet shut down."); 1235ErrorUtilities.VerifyThrow(!submission.IsCompleted, "Submission already complete."); 1274ErrorUtilities.VerifyThrow( 1348ErrorUtilities.VerifyThrow(resolvedConfiguration is not null, "Cannot call project cache without having BuildRequestConfiguration"); 1961ErrorUtilities.VerifyThrow( 3173ErrorUtilities.VerifyThrow(_configCache == null, "caches must not be set at this point"); 3174ErrorUtilities.VerifyThrow(_resultsCache == null, "caches must not be set at this point");
BackEnd\BuildManager\BuildSubmission.cs (2)
199ErrorUtilities.VerifyThrow(BuildResult != null, 217ErrorUtilities.VerifyThrow(BuildRequest != null,
BackEnd\BuildManager\CacheAggregator.cs (5)
34ErrorUtilities.VerifyThrow(!_aggregated, "Cannot add after aggregation"); 41ErrorUtilities.VerifyThrow(!_aggregated, "Cannot aggregate twice"); 61ErrorUtilities.VerifyThrow(configs.Length == results.Length, "Assuming 1-to-1 mapping between configs and results. Otherwise it means the caches are either not minimal or incomplete"); 75ErrorUtilities.VerifyThrow(_aggregatedConfigCache.GetMatchingConfiguration(config) == null, "Input caches should not contain entries for the same configuration"); 88ErrorUtilities.VerifyThrow(seenConfigIds.Contains(result.ConfigurationId), "Each result should have a corresponding configuration. Otherwise the caches are not consistent");
BackEnd\BuildManager\LegacyThreadingData.cs (2)
58ErrorUtilities.VerifyThrow(_instanceForMainThread == null || (_instanceForMainThread != null && value == null) || (_instanceForMainThread == value), "Should not assign to instanceForMainThread twice without cleaning it"); 158ErrorUtilities.VerifyThrow(
BackEnd\Components\BuildComponentFactoryCollection.cs (1)
241ErrorUtilities.VerifyThrow(Pattern == CreationPattern.Singleton, "Cannot shutdown non-singleton.");
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (10)
190ErrorUtilities.VerifyThrow(_componentHost != null, "BuildRequestEngine not initialized by component host."); 218ErrorUtilities.VerifyThrow(_nodeLoggingContext != null, "Node logging context not set."); 504ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 594ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!"); 734ErrorUtilities.VerifyThrow(activeEntry == null, "Multiple active requests"); 915ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 1115ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 1279ErrorUtilities.VerifyThrow((requestsToIssue == null) || (requestsToIssue.Count == 0), "Entry shouldn't be ready if we also issued requests."); 1332ErrorUtilities.VerifyThrow(config.WasGeneratedByNode, "InvalidConfigurationId"); 1334ErrorUtilities.VerifyThrow(_unresolvedConfigurations.HasConfiguration(config.ConfigurationId), "NoUnresolvedConfiguration");
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (12)
127ErrorUtilities.VerifyThrow(requestConfiguration.ConfigurationId == request.ConfigurationId, "Configuration id mismatch"); 184ErrorUtilities.VerifyThrow(value == null || _requestBuilder == null, "Request Builder already set."); 195ErrorUtilities.VerifyThrow(configuration.WasGeneratedByNode, "Configuration has already been resolved."); 334ErrorUtilities.VerifyThrow(result.CircularDependency, "Received result for target in progress and it wasn't a circular dependency error."); 366ErrorUtilities.VerifyThrow(!_outstandingResults.ContainsKey(result.NodeRequestId), "Request already contains results."); 403ErrorUtilities.VerifyThrow(_unresolvedConfigurations == null, "All configurations must be resolved before Continue may be called."); 404ErrorUtilities.VerifyThrow(_outstandingRequests == null, "All outstanding requests must have been satisfied."); 475ErrorUtilities.VerifyThrow(Result == null, "Entry already Completed."); 483ErrorUtilities.VerifyThrow(_unresolvedConfigurations == null, "Entry must not have any unresolved configurations."); 484ErrorUtilities.VerifyThrow(_outstandingRequests == null, "Entry must have no outstanding requests."); 485ErrorUtilities.VerifyThrow(_outstandingResults == null, "Results must be consumed before request may be completed."); 511ErrorUtilities.VerifyThrow(addToIssueList, "Requests with unresolved configurations should always be added to the issue list.");
BackEnd\Components\Caching\ConfigCache.cs (3)
77ErrorUtilities.VerifyThrow(config.ConfigurationId != 0, "Invalid configuration ID"); 167ErrorUtilities.VerifyThrow(configuration.IsLoaded, "Request to create configuration did not honor request to also load project."); 214ErrorUtilities.VerifyThrow(_configurations.Count > 0, "No configurations exist from which to obtain the smallest configuration id.");
BackEnd\Components\Caching\ConfigCacheWithOverride.cs (4)
56ErrorUtilities.VerifyThrow(!CurrentCache.HasConfiguration(configId), "caches should not overlap"); 84ErrorUtilities.VerifyThrow(CurrentCache.GetMatchingConfiguration(config) == null, "caches should not overlap"); 101ErrorUtilities.VerifyThrow(CurrentCache.GetMatchingConfiguration(configMetadata) == null, "caches should not overlap"); 123ErrorUtilities.VerifyThrow(!CurrentCache.HasConfiguration(configId), "caches should not overlap");
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (2)
39ErrorUtilities.VerifyThrow(IsCollectionEmptyOrUncreated(RegisteredTaskObjectLifetime.Build), "Build lifetime objects were not disposed at the end of the build"); 73ErrorUtilities.VerifyThrow(IsCollectionEmptyOrUncreated(RegisteredTaskObjectLifetime.Build), "Build lifetime objects were not disposed at the end of the build");
BackEnd\Components\Caching\ResultsCache.cs (3)
115ErrorUtilities.VerifyThrow(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest"); 123ErrorUtilities.VerifyThrow(result.HasResultsForTarget(target), "No results in cache for target " + target); 168ErrorUtilities.VerifyThrow(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest");
BackEnd\Components\Caching\ResultsCacheWithOverride.cs (3)
56ErrorUtilities.VerifyThrow(CurrentCache.GetResultForRequest(request) == null, "caches should not overlap"); 70ErrorUtilities.VerifyThrow(CurrentCache.GetResultsForConfiguration(configurationId) == null, "caches should not overlap"); 93ErrorUtilities.VerifyThrow(
BackEnd\Components\Communications\NodeEndpointInProc.cs (11)
335ErrorUtilities.VerifyThrow(_mode == EndpointMode.Asynchronous, "EndPoint mode is synchronous, should be asynchronous"); 336ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null"); 337ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null"); 350ErrorUtilities.VerifyThrow(_packetPump == null, "packetPump != null"); 351ErrorUtilities.VerifyThrow(_packetAvailable == null, "packetAvailable != null"); 352ErrorUtilities.VerifyThrow(_terminatePacketPump == null, "terminatePacketPump != null"); 353ErrorUtilities.VerifyThrow(_packetQueue == null, "packetQueue != null"); 387ErrorUtilities.VerifyThrow(_packetPump != null, "packetPump == null"); 388ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable == null"); 389ErrorUtilities.VerifyThrow(_terminatePacketPump != null, "terminatePacketPump == null"); 390ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue == null");
BackEnd\Components\Communications\NodeManager.cs (3)
140ErrorUtilities.VerifyThrow(!_componentShutdown, "We should never be calling ShutdownNodes after ShutdownComponent has been called"); 171ErrorUtilities.VerifyThrow(_componentHost == null, "NodeManager already initialized."); 172ErrorUtilities.VerifyThrow(host != null, "We can't create a NodeManager with a null componentHost");
BackEnd\Components\Communications\NodeProviderInProc.cs (4)
220ErrorUtilities.VerifyThrow(nodeId != InvalidInProcNodeId, "Cannot create in-proc node."); 363ErrorUtilities.VerifyThrow(_inProcNode == null, "In Proc node already instantiated."); 364ErrorUtilities.VerifyThrow(_inProcNodeEndpoint == null, "In Proc node endpoint already instantiated."); 422ErrorUtilities.VerifyThrow(endpoint == _inProcNodeEndpoint, "Received link status event for a node other than our peer.");
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (3)
325ErrorUtilities.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"); 519ErrorUtilities.VerifyThrow(_nodeIdToPacketFactory.ContainsKey((int)hostContext) && _nodeIdToPacketHandler.ContainsKey((int)hostContext), "Why are we trying to disconnect from a context that we already disconnected from? Did we call DisconnectFromHost twice?"); 531ErrorUtilities.VerifyThrow(!_nodeIdToPacketFactory.ContainsKey((int)hostContext), "We should not already have a factory for this context! Did we forget to call DisconnectFromHost somewhere?");
BackEnd\Components\Communications\TaskHostNodeManager.cs (3)
68ErrorUtilities.VerifyThrow(!_componentShutdown, "We should never be calling ShutdownNodes after ShutdownComponent has been called"); 89ErrorUtilities.VerifyThrow(_componentHost == null, "TaskHostNodeManager already initialized."); 90ErrorUtilities.VerifyThrow(host != null, "We can't create a TaskHostNodeManager with a null componentHost");
BackEnd\Components\Communications\TranslatorExtensions.cs (3)
74ErrorUtilities.VerifyThrow(type != null, "type cannot be null"); 75ErrorUtilities.VerifyThrow( 78ErrorUtilities.VerifyThrow(
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (2)
42ErrorUtilities.VerifyThrow(sendData != null, "sendData delegate is null"); 138ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
BackEnd\Components\Logging\CentralForwardingLogger.cs (1)
81ErrorUtilities.VerifyThrow(eventSource != null, "eventSource is null");
BackEnd\Components\Logging\EvaluationLoggingContext.cs (1)
47ErrorUtilities.VerifyThrow(IsValid, "invalid");
BackEnd\Components\Logging\EventRedirectorToSink.cs (3)
40ErrorUtilities.VerifyThrow(eventSink != null, "eventSink is null"); 41ErrorUtilities.VerifyThrow(loggerId >= 0, "loggerId should be greater or equal to 0"); 56ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
BackEnd\Components\Logging\LoggingService.cs (15)
856ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 857ErrorUtilities.VerifyThrow(buildComponentHost != null, "BuildComponentHost was null"); 892ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 962ErrorUtilities.VerifyThrow(packet != null, "packet was null"); 1038ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1039ErrorUtilities.VerifyThrow(logger != null, "logger was null"); 1127ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1128ErrorUtilities.VerifyThrow(forwardingLogger != null, "forwardingLogger was null"); 1192ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1193ErrorUtilities.VerifyThrow(forwardingLoggerSink != null, "forwardingLoggerSink was null"); 1194ErrorUtilities.VerifyThrow(descriptions != null, "loggerDescriptions was null"); 1195ErrorUtilities.VerifyThrow(descriptions.Count > 0, "loggerDescriptions was null"); 1247ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null"); 1298ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null"); 1348ErrorUtilities.VerifyThrow(_configCache.Value.HasConfiguration(projectStartedEventArgs.ProjectId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node.");
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (24)
41ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for comment message."); 113ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message."); 156ErrorUtilities.VerifyThrow(invalidProjectFileException != null, "Need exception context."); 157ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext is null"); 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"); 458ErrorUtilities.VerifyThrow(projectEvaluationEventContext != null, "projectBuildEventContext"); 534ErrorUtilities.VerifyThrow(nodeBuildEventContext != null, "Need a nodeBuildEventContext"); 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"); 638ErrorUtilities.VerifyThrow(projectBuildEventContext != null, "projectBuildEventContext is null"); 679ErrorUtilities.VerifyThrow(targetBuildEventContext != null, "targetBuildEventContext is null"); 706ErrorUtilities.VerifyThrow(taskBuildEventContext != null, "targetBuildEventContext is null"); 735ErrorUtilities.VerifyThrow(targetBuildEventContext != null, "targetBuildEventContext is null"); 775ErrorUtilities.VerifyThrow(taskBuildEventContext != null, "taskBuildEventContext is null"); 801ErrorUtilities.VerifyThrow(eventName != null, "eventName is null"); 823ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext was null"); 824ErrorUtilities.VerifyThrow(filePath != null, "response file path was null");
BackEnd\Components\Logging\NodeLoggingContext.cs (4)
26ErrorUtilities.VerifyThrow(nodeId != BuildEventContext.InvalidNodeId, "Should not ever be given an invalid NodeId"); 43ErrorUtilities.VerifyThrow(this.IsValid, "Build not started."); 68ErrorUtilities.VerifyThrow(this.IsValid, "Build not started."); 80ErrorUtilities.VerifyThrow(this.IsValid, "Build not started.");
BackEnd\Components\Logging\ProjectLoggingContext.cs (2)
263ErrorUtilities.VerifyThrow(this.IsValid, "invalid"); 273ErrorUtilities.VerifyThrow(this.IsValid, "invalid");
BackEnd\Components\Logging\TaskLoggingContext.cs (1)
131ErrorUtilities.VerifyThrow(this.IsValid, "invalid");
BackEnd\Components\ProjectCache\CacheContext.cs (1)
44ErrorUtilities.VerifyThrow(
BackEnd\Components\ProjectCache\CacheResult.cs (2)
64ErrorUtilities.VerifyThrow( 99ErrorUtilities.VerifyThrow(resultType != CacheResultType.CacheHit, "CantBeCacheHit");
BackEnd\Components\ProjectCache\ProjectCacheException.cs (5)
30ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(message), "Need error message."); 31ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(errorCode), "Must specify the error message code."); 58ErrorUtilities.VerifyThrow(messageResourceName != null, "Need error message."); 69ErrorUtilities.VerifyThrow(messageResourceName != null, "Need error message."); 80ErrorUtilities.VerifyThrow(messageResourceName != null, "Need error message.");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (2)
481ErrorUtilities.VerifyThrow(submission.BuildRequestData != null, 684ErrorUtilities.VerifyThrow(projectPathAttribute is not null, "Expected VS to set the project path on each ProjectConfiguration element.");
BackEnd\Components\RequestBuilder\BatchingEngine.cs (2)
307ErrorUtilities.VerifyThrow(itemListsToBeBatched.Count > 0, "Need item types consumed by the batchable object."); 308ErrorUtilities.VerifyThrow(consumedMetadataReferences.Count > 0, "Need item metadata consumed by the batchable object.");
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
83ErrorUtilities.VerifyThrow(lookup != null, "Need lookup.");
BackEnd\Components\RequestBuilder\Lookup.cs (7)
263ErrorUtilities.VerifyThrow(_lookupScopes.Count >= 2, "Too many calls to Leave()."); 602ErrorUtilities.VerifyThrow(existing.Count == 0, "Cannot add an itemgroup of this type."); 833ErrorUtilities.VerifyThrow(!_cloneTable.ContainsKey(cloneItem), "Should be new, not already in table!"); 960ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.Contains(item), "Item should not be in table"); 975ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.ContainsKey(item), "Item should not be in table"); 1007ErrorUtilities.VerifyThrow(_lookupScopes.Count > 1, "Operation in outer scope not supported"); 1240ErrorUtilities.VerifyThrow(modificationType != ModificationType.Update, "Modification type may only be update when a value is specified.");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (28)
201ErrorUtilities.VerifyThrow(_componentHost != null, "Host not set."); 202ErrorUtilities.VerifyThrow(_targetBuilder == null, "targetBuilder not null"); 203ErrorUtilities.VerifyThrow(_nodeLoggingContext == null, "nodeLoggingContext not null"); 204ErrorUtilities.VerifyThrow(_requestEntry == null, "requestEntry not null"); 205ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Cancel already called"); 225ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building"); 226ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated"); 227ErrorUtilities.VerifyThrow(!_continueEvent.WaitOne(0), "Request already continued"); 242ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building"); 243ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated"); 244ErrorUtilities.VerifyThrow(_pendingResourceRequests.Any(), "No pending resource requests"); 339ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 340ErrorUtilities.VerifyThrow(projectFiles.Length == properties.Length, "Properties and project counts not the same"); 341ErrorUtilities.VerifyThrow(projectFiles.Length == toolsVersions.Length, "Tools versions and project counts not the same"); 384ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests"); 474ErrorUtilities.VerifyThrow(!_inMSBuildCallback, "Already in an MSBuild callback!"); 484ErrorUtilities.VerifyThrow(_inMSBuildCallback, "Not in an MSBuild callback!"); 493ErrorUtilities.VerifyThrow(Monitor.IsEntered(monitorLockObject), "Not running under the given lock"); 554ErrorUtilities.VerifyThrow(_componentHost == null, "RequestBuilder already initialized."); 639ErrorUtilities.VerifyThrow(_requestTask == null, "Already have a task."); 681ErrorUtilities.VerifyThrow(_componentHost.LegacyThreadingData.MainThreadSubmissionId != _requestEntry.Request.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request."); 865ErrorUtilities.VerifyThrow(result == null, "Result already set when exception was thrown."); 997ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests"); 1015ErrorUtilities.VerifyThrow(!isContinue, "Unexpected null results during continue"); 1106ErrorUtilities.VerifyThrow(_targetBuilder != null, "Target builder is null"); 1321ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedCurrentDirectory != null, "Current directory not previously saved."); 1322ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedEnvironmentVariables != null, "Current environment not previously saved."); 1377ErrorUtilities.VerifyThrow(!_isZombie, "RequestBuilder has been zombied.");
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
110ErrorUtilities.VerifyThrow(targetNames.Length > 0, "List of targets must be non-empty"); 111ErrorUtilities.VerifyThrow(_componentHost != null, "InitializeComponent must be called before building targets.");
BackEnd\Components\RequestBuilder\TargetEntry.cs (2)
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.");
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (16)
57ErrorUtilities.VerifyThrow(project != null, "Need a project."); 58ErrorUtilities.VerifyThrow(targetToAnalyze != null, "Need a target to analyze."); 92ErrorUtilities.VerifyThrow(_targetInputSpecification != null, "targetInputSpecification is null"); 105ErrorUtilities.VerifyThrow(_targetOutputSpecification != null, "targetOutputSpecification is null"); 204ErrorUtilities.VerifyThrow(itemVectorsReferencedInBothTargetInputsAndOutputs.Count > 0, "The target must have inputs."); 205ErrorUtilities.VerifyThrow(!IsItemVectorEmpty(itemVectorsInTargetInputs), "The target must have inputs."); 609ErrorUtilities.VerifyThrow(inputItemVectors.Count == 1, 713ErrorUtilities.VerifyThrow(numberOfInputItemVectorsWithAllChangedItems <= itemVectorsReferencedInBothTargetInputsAndOutputs.Count, 719ErrorUtilities.VerifyThrow(result == DependencyAnalysisResult.IncrementalBuild, 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"); 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"); 1199ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(path1) && !string.IsNullOrEmpty(path2),
BackEnd\Components\RequestBuilder\TaskBuilder.cs (6)
154ErrorUtilities.VerifyThrow(taskInstance != null, "Need to specify the task instance."); 211ErrorUtilities.VerifyThrow(_taskExecutionHost != null, "taskExecutionHost not initialized."); 492ErrorUtilities.VerifyThrow(howToExecuteTask == TaskExecutionMode.InferOutputsOnly, "should be inferring"); 494ErrorUtilities.VerifyThrow( 663ErrorUtilities.VerifyThrow(executionResult != null, "Unexpected null execution result"); 1148ErrorUtilities.VerifyThrow(howToExecuteTask == TaskExecutionMode.InferOutputsOnly, "should be inferring");
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
359ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding."); 388ErrorUtilities.VerifyThrow(_yieldThreadId != -1, "Cannot call Reacquire() before Yield()."); 1274ErrorUtilities.VerifyThrow(_activeProxy, "Attempted to use an inactive task host.");
BackEnd\Components\Scheduler\SchedulableRequest.cs (14)
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."); 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."); 401ErrorUtilities.VerifyThrow(_assignedNodeId == Scheduler.InvalidNodeId || _assignedNodeId == nodeId, "Request must always resume on the same node on which it was started."); 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."); 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 (15)
329ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target"); 334ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target"); 343ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should exist"); 355ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target"); 401ErrorUtilities.VerifyThrow(result.ParentGlobalRequestId == request.Parent.BuildRequest.GlobalRequestId, "Result's parent doesn't match request's parent."); 781ErrorUtilities.VerifyThrow(responses.Count > 0, "We failed to request a node to be created."); 1359ErrorUtilities.VerifyThrow(nodeId != InvalidNodeId, "Invalid node id specified."); 1374ErrorUtilities.VerifyThrow(config.ResultsNodeId != InvalidNodeId, "Configuration's results node is not set."); 1387ErrorUtilities.VerifyThrow( 1558ErrorUtilities.VerifyThrow(inProcNodesToCreate == 1, "We should never be trying to create more than one inproc node"); 1852ErrorUtilities.VerifyThrow(request.Parent == null, "Unexpectedly generated a SubmissionComplete response for a request which is not top-level."); 2037ErrorUtilities.VerifyThrow( 2115ErrorUtilities.VerifyThrow(parentRequestNode != InvalidNodeId, "Invalid parent node provided."); 2118ErrorUtilities.VerifyThrow(result.ParentGlobalRequestId == requestWhichGeneratedResult.ParentGlobalRequestId, "Result's parent doesn't match request's parent."); 2177ErrorUtilities.VerifyThrow(request.ConfigurationId != BuildRequestConfiguration.InvalidConfigurationId, "Requests should have a valid configuration id at this point");
BackEnd\Components\Scheduler\ScheduleTimeRecord.cs (2)
42ErrorUtilities.VerifyThrow(_startTimeForCurrentState == DateTime.MinValue, "Can't get the accumulated time while the timer is still running."); 52ErrorUtilities.VerifyThrow(_startTimeForCurrentState == DateTime.MinValue, "Cannot start the counter when it is already running.");
BackEnd\Components\Scheduler\SchedulingData.cs (4)
369ErrorUtilities.VerifyThrow(!_blockedRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already blocked!"); 374ErrorUtilities.VerifyThrow(!_yieldingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already yielded!"); 391ErrorUtilities.VerifyThrow(!_executingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already executing!"); 405ErrorUtilities.VerifyThrow(!_readyRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already ready!");
BackEnd\Shared\BuildRequest.cs (4)
264ErrorUtilities.VerifyThrow(_globalRequestId == InvalidGlobalRequestId, "Global Request ID cannot be set twice."); 347ErrorUtilities.VerifyThrow(_buildEventContext == BuildEventContext.Invalid, "The build event context is already set."); 410ErrorUtilities.VerifyThrow(!IsConfigurationResolved, "Configuration already resolved"); 412ErrorUtilities.VerifyThrow(IsConfigurationResolved, "Configuration not resolved");
BackEnd\Shared\BuildRequestConfiguration.cs (15)
232ErrorUtilities.VerifyThrow(configId != InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor."); 234ErrorUtilities.VerifyThrow(other._transferredState == null, "Unexpected transferred state still set on other configuration."); 375ErrorUtilities.VerifyThrow(!IsCached, "We shouldn't be accessing the ProjectInstance when the configuration is cached."); 387ErrorUtilities.VerifyThrow(_transferredProperties == null, "Shouldn't be transferring entire state of ProjectInstance when transferredProperties is not null."); 407ErrorUtilities.VerifyThrow(project != null, "Cannot set null project."); 513ErrorUtilities.VerifyThrow(IsLoaded, $"This {nameof(BuildRequestConfiguration)} must be loaded at the end of this method"); 540ErrorUtilities.VerifyThrow(_projectInitialTargets == null, "Initial targets cannot be reset once they have been set."); 556ErrorUtilities.VerifyThrow(_projectDefaultTargets == null, "Default targets cannot be reset once they have been set."); 571ErrorUtilities.VerifyThrow( 590ErrorUtilities.VerifyThrow(!IsCached, "Configuration is cached, we shouldn't be accessing the lookup."); 767ErrorUtilities.VerifyThrow(request.ConfigurationId == ConfigurationId, "Request does not match configuration."); 768ErrorUtilities.VerifyThrow(_projectInitialTargets != null, "Initial targets have not been set."); 769ErrorUtilities.VerifyThrow(_projectDefaultTargets != null, "Default targets have not been set."); 773ErrorUtilities.VerifyThrow( 813ErrorUtilities.VerifyThrow(Path.IsPathRooted(referenceFullPath), "Method does not treat path normalization cases");
BackEnd\Shared\BuildResult.cs (2)
548ErrorUtilities.VerifyThrow( 568ErrorUtilities.VerifyThrow(results.ConfigurationId == ConfigurationId, "Result configurations don't match");
BackEnd\Shared\TargetResult.cs (1)
337ErrorUtilities.VerifyThrow(buffer != null, "Unexpected null items buffer during translation.");
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (4)
426ErrorUtilities.VerifyThrow(_taskFactoryWrapper != null, "Need a taskFactoryWrapper to retrieve outputs from."); 564ErrorUtilities.VerifyThrow(TaskInstance == null, "Task Instance should be null"); 1263ErrorUtilities.VerifyThrow(parameterValue != null, "Didn't expect null parameterValue in InitializeTaskVectorParameter"); 1598ErrorUtilities.VerifyThrow(_taskFactoryWrapper != null, "Expected taskFactoryWrapper to not be null");
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
42ErrorUtilities.VerifyThrow(host != null, "BuildComponentHost was null");
BuildEventFileInfo.cs (1)
87ErrorUtilities.VerifyThrow(e != null, "Need exception context.");
Collections\ConcurrentQueueExtensions.cs (1)
22ErrorUtilities.VerifyThrow(stack.TryDequeue(out T result), "Unable to dequeue from queue");
Collections\ConcurrentStackExtensions.cs (2)
22ErrorUtilities.VerifyThrow(stack.TryPeek(out T result), "Unable to peek from stack"); 32ErrorUtilities.VerifyThrow(stack.TryPop(out T result), "Unable to pop from stack");
Collections\CopyOnWritePropertyDictionary.cs (3)
107ErrorUtilities.VerifyThrow(String.Equals(name, value.Key, StringComparison.OrdinalIgnoreCase), "Key must match value's key"); 251ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 303ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key");
Collections\ItemDictionary.cs (2)
340ErrorUtilities.VerifyThrow(String.Equals(itemType, item.Key, StringComparison.OrdinalIgnoreCase), "Item type mismatch"); 371ErrorUtilities.VerifyThrow(!_itemLists.ContainsKey(itemType), "Should be none");
Collections\MultiDictionary.cs (2)
111ErrorUtilities.VerifyThrow(value != null, "Null value not allowed"); 131ErrorUtilities.VerifyThrow(value != null, "Null value not allowed");
Collections\PropertyDictionary.cs (3)
203ErrorUtilities.VerifyThrow(String.Equals(name, value.Key, StringComparison.OrdinalIgnoreCase), "Key must match value's key"); 353ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 437ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key");
Collections\ReadOnlyConvertingDictionary.cs (1)
158ErrorUtilities.VerifyThrow(array.Length - arrayIndex >= _backing.Count, "Specified array size insufficient to hold the contents of the collection.");
CommunicationsUtilities.cs (3)
463ErrorUtilities.VerifyThrow(bytes.Length == 4, "Int should be 4 bytes"); 624ErrorUtilities.VerifyThrow(taskHostParameters.TryGetValue(XMakeAttributes.runtime, out string runtimeVersion), "Should always have an explicit runtime when we call this method."); 625ErrorUtilities.VerifyThrow(taskHostParameters.TryGetValue(XMakeAttributes.architecture, out string architecture), "Should always have an explicit architecture when we call this method.");
Construction\ProjectChooseElement.cs (1)
95ErrorUtilities.VerifyThrow(containingProject.Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectElement.cs (2)
167ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 264ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectElementContainer.cs (15)
176ErrorUtilities.VerifyThrow(child.NextSibling.PreviousSibling == reference, "Invalid structure"); 232ErrorUtilities.VerifyThrow(child.PreviousSibling.NextSibling == reference, "Invalid structure"); 256ErrorUtilities.VerifyThrow(FirstChild != null, "Invalid structure"); 275ErrorUtilities.VerifyThrow(LastChild != null, "Invalid structure"); 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."); 600ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 642ErrorUtilities.VerifyThrow(FirstChild == null && LastChild == null, "Expecting no children"); 683ErrorUtilities.VerifyThrow(child.NextSibling == null || child.NextSibling.PreviousSibling != this, "Invalid structure"); 684ErrorUtilities.VerifyThrow(child.PreviousSibling == null || child.PreviousSibling.NextSibling != this, "Invalid structure");
Construction\ProjectRootElement.cs (3)
1755ErrorUtilities.VerifyThrow(document.FullPath == null, "Only virtual documents supported"); 1794ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 1851ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectTaskElement.cs (1)
215ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectUsingTaskBodyElement.cs (1)
166ErrorUtilities.VerifyThrow(parentUsingTask.Link == null, "TaskFactory");
Construction\Solution\ProjectInSolution.cs (1)
500ErrorUtilities.VerifyThrow(projectName != null, "Null strings not allowed.");
Construction\Solution\SolutionFile.cs (9)
336ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(_solutionFile), "ReadSolutionModel() got a null or empty solution file."); 523ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(solutionFile), "null solution file passed to GetSolutionFileMajorVersion!"); 688ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseFileHeader(): reader is null!"); 714ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(_solutionFile), "ParseSolutionFile() got a null solution file!"); 918ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseFileHeader(): reader is null!"); 983ErrorUtilities.VerifyThrow(versionString != null, "ValidateSolutionFileVersion() got a null line!"); 1027ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(firstLine), "ParseProject() got a null firstLine!"); 1028ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseProject() got a null reader!"); 1281ErrorUtilities.VerifyThrow(proj.RelativePath != null, "Project relative path cannot be null.");
Construction\UsingTaskParameterGroupElement.cs (1)
135ErrorUtilities.VerifyThrow(parentUsingTask.Link == null, "TaskFactory");
Definition\Project.cs (6)
1797ErrorUtilities.VerifyThrow(!implementationInternal.IsZombified, "OM_ProjectIsNoLongerActive"); 3557ErrorUtilities.VerifyThrow(_data.Expander.Metadata == null, "Should be null"); 3735ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 3756ErrorUtilities.VerifyThrow(!IsDirty, "Should not be dirty now"); 3803ErrorUtilities.VerifyThrow(LastEvaluationId == BuildEventContext.InvalidEvaluationId, "This is the first evaluation therefore the last evaluation id is invalid"); 3807ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Last evaluation ID must be valid after the first evaluation");
Definition\ProjectCollection.cs (3)
514ErrorUtilities.VerifyThrow(_defaultToolsVersion != null, "Should have a default"); 2145ErrorUtilities.VerifyThrow(_buildTimeEventSource == null, "Already registered for build-time."); 2175ErrorUtilities.VerifyThrow(_designTimeEventSource != null, "Already unregistered for design-time.");
Definition\ToolsetReader.cs (1)
309ErrorUtilities.VerifyThrow(
ElementLocation\ElementLocation.cs (4)
143ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 255ErrorUtilities.VerifyThrow(line > -1 && column > -1, "Use zero for unknown"); 330ErrorUtilities.VerifyThrow(line > -1 && column > -1, "Use zero for unknown"); 331ErrorUtilities.VerifyThrow(line <= 65535 && column <= 65535, "Use ElementLocation instead");
ElementLocation\XmlDocumentWithLocation.cs (1)
359ErrorUtilities.VerifyThrow(Path.IsPathRooted(fullPath), "should be full path");
Errors\InternalLoggerException.cs (5)
92ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(message), "Need error message."); 93ErrorUtilities.VerifyThrow(innerException != null || initializationException, "Need the logger exception."); 94ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(errorCode), "Must specify the error message code."); 95ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(helpKeyword), "Must specify the help keyword for the IDE."); 247ErrorUtilities.VerifyThrow(messageResourceName != null, "Need error message.");
Evaluation\Conditionals\NumericExpressionNode.cs (1)
20ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(value), "NumericExpressionNode cannot have empty value");
Evaluation\Conditionals\Parser.cs (1)
102ErrorUtilities.VerifyThrow(0 != (optionSettings & ParserOptions.AllowProperties),
Evaluation\Conditionals\Scanner.cs (1)
62ErrorUtilities.VerifyThrow(0 != (options & ParserOptions.AllowProperties),
Evaluation\Conditionals\Token.cs (1)
93ErrorUtilities.VerifyThrow(
Evaluation\Evaluator.cs (3)
619ErrorUtilities.VerifyThrow(_data.EvaluationId == BuildEventContext.InvalidEvaluationId, "There is no prior evaluation ID. The evaluator data needs to be reset at this point"); 647ErrorUtilities.VerifyThrow(_data.EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 821ErrorUtilities.VerifyThrow(_evaluationProfiler.IsEmpty(), "Evaluation profiler stack is not empty.");
Evaluation\Expander.cs (11)
531ErrorUtilities.VerifyThrow((options & ExpanderOptions.BreakOnNotEmpty) == 0, "not supported"); 939ErrorUtilities.VerifyThrow(metadata != null, "Cannot expand metadata without providing metadata"); 1069ErrorUtilities.VerifyThrow(options != ExpanderOptions.Invalid, "Must be expanding metadata of some kind"); 1077ErrorUtilities.VerifyThrow(itemMetadataMatch.Success, "Need a valid item metadata."); 1197ErrorUtilities.VerifyThrow(properties != null, "Cannot expand properties without providing properties"); 1880ErrorUtilities.VerifyThrow(matches.Count == 1, "Expected just one item vector"); 1891ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items"); 2004ErrorUtilities.VerifyThrow(evaluatedItems != null, "Cannot expand items without providing items"); 2087ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items"); 3693ErrorUtilities.VerifyThrow(_loggingContext != null, $"The logging context is missed. {nameof(IntrinsicFunctions.RegisterBuildCheck)} can not be invoked."); 5045ErrorUtilities.VerifyThrow(cachedTypeInformation.Item1 != null || cachedTypeInformation.Item2 != null, "Function type information needs either string or type represented.");
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
125ErrorUtilities.VerifyThrow(
Evaluation\ProjectRootElementCache.cs (3)
108ErrorUtilities.VerifyThrow( 257ErrorUtilities.VerifyThrow( 544ErrorUtilities.VerifyThrow(_weakCache[oldFullPathIfAny] == projectRootElement, "Should already be present");
Evaluation\SimpleProjectRootElementCache.cs (1)
74ErrorUtilities.VerifyThrow(_cache.TryGetValue(key, out _),
FileMatcher.cs (4)
844ErrorUtilities.VerifyThrow((recursionState.SearchData.Filespec == null) || (recursionState.SearchData.RegexFileMatch == null), 847ErrorUtilities.VerifyThrow((recursionState.SearchData.Filespec != null) || (recursionState.SearchData.RegexFileMatch != null), 850ErrorUtilities.VerifyThrow(recursionState.RemainingWildcardDirectory != null, "Expected non-null remaning wildcard directory."); 1186ErrorUtilities.VerifyThrow(
FileUtilities.cs (2)
393ErrorUtilities.VerifyThrow(trailingSegmentsToKeep >= 0, "trailing segments must be positive"); 1144ErrorUtilities.VerifyThrow(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes.");
Graph\GraphBuilder.cs (5)
222ErrorUtilities.VerifyThrow(projectsByPath.TryGetValue(referencingProjectPath, out var referencingNodes), "nodes should include solution projects"); 227ErrorUtilities.VerifyThrow(projectsByPath.TryGetValue(referencedProjectPath, out List<ProjectGraphNode> projectToReturn), "nodes should include solution projects"); 454ErrorUtilities.VerifyThrow( 656ErrorUtilities.VerifyThrow(ReferenceItems.TryGetValue(key, out ProjectItemInstance referenceItem), "All requested keys should exist"); 699ErrorUtilities.VerifyThrow(ReferenceItems.TryRemove(key, out _), "All requested keys should exist");
Graph\GraphBuildSubmission.cs (2)
59ErrorUtilities.VerifyThrow(BuildResult != null, 67ErrorUtilities.VerifyThrow(result.SubmissionId == SubmissionId,
Graph\ProjectGraph.cs (1)
587ErrorUtilities.VerifyThrow(toposort.Count == graphNodes.Count, "sorted node count must be equal to total node count");
Graph\ProjectGraphNode.cs (1)
79ErrorUtilities.VerifyThrow(reference._referencingProjects.Contains(this), "references should point to the nodes referencing them");
Graph\ProjectInterpretation.cs (5)
64ErrorUtilities.VerifyThrow( 231ErrorUtilities.VerifyThrow(!(isOuterBuild && isInnerBuild), $"A project cannot be an outer and inner build at the same time: ${project.FullPath}"); 266ErrorUtilities.VerifyThrow( 288ErrorUtilities.VerifyThrow(!String.IsNullOrWhiteSpace(globalPropertyName), "Must have an inner build property"); 289ErrorUtilities.VerifyThrow(!String.IsNullOrWhiteSpace(globalPropertyValues), "Must have values for the inner build property");
Instance\ProjectInstance.cs (6)
698ErrorUtilities.VerifyThrow(filter == null || isImmutable, 2346ErrorUtilities.VerifyThrow(ProjectRootElementCache == null, $"{nameof(ProjectRootElementCache)} is already set. Cannot set again"); 2347ErrorUtilities.VerifyThrow(_hostServices == null, $"{nameof(HostServices)} is already set. Cannot set again"); 2348ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 3167ErrorUtilities.VerifyThrow(EvaluationId == BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation"); 3189ErrorUtilities.VerifyThrow(EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
Instance\ProjectMetadataInstance.cs (1)
178ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");
Instance\ProjectPropertyInstance.cs (2)
174ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 273ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "read only");
Instance\TaskFactoryLoggingHost.cs (1)
360ErrorUtilities.VerifyThrow(_activeProxy, "Attempted to use an inactive task factory logging host.");
Instance\TaskRegistry.cs (3)
803ErrorUtilities.VerifyThrow(initialState == null || initialCount == null, "at most one can be non-null"); 1178ErrorUtilities.VerifyThrow(taskFactoryParameters.Count == 2, "if the parameter dictionary is non-null, it should contain both parameters when we get here!"); 1375ErrorUtilities.VerifyThrow(taskFactoryLoadInfo != null, "TaskFactoryLoadInfo should never be null");
LoadedType.cs (3)
32ErrorUtilities.VerifyThrow(type != null, "We must have the type."); 33ErrorUtilities.VerifyThrow(assemblyLoadInfo != null, "We must have the assembly the type was loaded from."); 34ErrorUtilities.VerifyThrow(loadedAssembly is not null, "The assembly should always be loaded even if only by MetadataLoadContext.");
Logging\ParallelLogger\ParallelConsoleLogger.cs (3)
882ErrorUtilities.VerifyThrow(startedEvent != null, "Started event should not be null in the finished event handler"); 1447ErrorUtilities.VerifyThrow(startedEvent != null, "Project Started should not be null in deferred target started"); 1742ErrorUtilities.VerifyThrow(_startedEvent != null, "Cannot have finished counter without started counter. ");
Logging\SerialConsoleLogger.cs (1)
753ErrorUtilities.VerifyThrow(this.Verbosity < LoggerVerbosity.Detailed,
LogMessagePacketBase.cs (1)
327ErrorUtilities.VerifyThrow(nodeBuildEvent != null, "nodeBuildEvent was null");
Modifiers.cs (5)
385ErrorUtilities.VerifyThrow(itemSpec != null, "Need item-spec to modify."); 386ErrorUtilities.VerifyThrow(modifier != null, "Need modifier to apply to item-spec."); 417ErrorUtilities.VerifyThrow(FileUtilitiesRegex.StartsWithUncPattern(modifiedItemSpec), 478ErrorUtilities.VerifyThrow((modifiedItemSpec.Length > length) && IsSlash(modifiedItemSpec[length]), 486ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(modifiedItemSpec) && IsSlash(modifiedItemSpec[0]),
NodeEndpointOutOfProcBase.cs (3)
296ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread."); 318ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null"); 319ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null");
OutOfProcTaskHostTaskResult.cs (2)
70ErrorUtilities.VerifyThrow( 79ErrorUtilities.VerifyThrow(exceptionMessage != null, "If we have message args, we need a message.");
ProjectFileErrorUtilities.cs (1)
138ErrorUtilities.VerifyThrow(projectFile != null, "Must specify the invalid project file. If project file is not available, use VerifyThrowInvalidProject() and pass in the XML node instead.");
ProjectWriter.cs (2)
142ErrorUtilities.VerifyThrow(itemVectorTransforms.Count == (surroundingTextPieces.Length - 1), 154ErrorUtilities.VerifyThrow(itemVectorTransform.Success,
ReadOnlyCollection.cs (1)
38ErrorUtilities.VerifyThrow(backing != null, "Need backing collection");
Resources\AssemblyResources.cs (1)
32ErrorUtilities.VerifyThrow(s_msbuildExeResourceManager == null, "Only one extra resource manager");
TaskLoggingHelper.cs (3)
330ErrorUtilities.VerifyThrow(errorCode == null, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message); 795ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'"); 1163ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
TaskParameter.cs (2)
396ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 463ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!");
TempFileUtilities.cs (1)
188ErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique");
TypeLoader.cs (1)
70ErrorUtilities.VerifyThrow(isDesiredType != null, "need a type filter");
Utilities\EngineFileUtilities.cs (1)
337ErrorUtilities.VerifyThrow(fileList != null, "We must have a list of files here, even if it's empty.");
Utilities\Utilities.cs (2)
82ErrorUtilities.VerifyThrow(s != null, "Need value to set."); 449ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(toolsVersionToUse), "Should always return a ToolsVersion");
XMakeAttributes.cs (4)
170ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 214ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 287ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method"); 354ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method");
Microsoft.Build.Engine.UnitTests (3)
ErrorUtilities_Tests.cs (3)
21ErrorUtilities.VerifyThrow(false, "msbuild rules"); 36ErrorUtilities.VerifyThrow(true, "msbuild rules"); 43ErrorUtilities.VerifyThrow(true, "blah");