524 references to VerifyThrow
Microsoft.Build (473)
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)
872ErrorUtilities.VerifyThrow(configuration.Project != null, "Configuration should have been loaded."); 1004ErrorUtilities.VerifyThrow(_buildSubmissions.Count == 0 && _graphBuildSubmissions.Count == 0, "All submissions not yet complete."); 1005ErrorUtilities.VerifyThrow(_activeNodes.Count == 0, "All nodes not yet shut down."); 1260ErrorUtilities.VerifyThrow(!submission.IsCompleted, "Submission already complete."); 1297ErrorUtilities.VerifyThrow( 1371ErrorUtilities.VerifyThrow(resolvedConfiguration is not null, "Cannot call project cache without having BuildRequestConfiguration"); 1981ErrorUtilities.VerifyThrow( 3167ErrorUtilities.VerifyThrow(_configCache == null, "caches must not be set at this point"); 3168ErrorUtilities.VerifyThrow(_resultsCache == null, "caches must not be set at this point");
BackEnd\BuildManager\BuildSubmission.cs (1)
157ErrorUtilities.VerifyThrow(result.ConfigurationId == BuildRequest.ConfigurationId, "BuildResult doesn't match BuildRequest configuration");
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)
236ErrorUtilities.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."); 501ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 591ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!"); 731ErrorUtilities.VerifyThrow(activeEntry == null, "Multiple active requests"); 912ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 1112ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 1276ErrorUtilities.VerifyThrow((requestsToIssue == null) || (requestsToIssue.Count == 0), "Entry shouldn't be ready if we also issued requests."); 1329ErrorUtilities.VerifyThrow(config.WasGeneratedByNode, "InvalidConfigurationId"); 1331ErrorUtilities.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"); 137ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null");
BackEnd\Components\Logging\BuildLoggingContext.cs (1)
62ErrorUtilities.VerifyThrow(IsValid, "must be valid");
BackEnd\Components\Logging\CentralForwardingLogger.cs (1)
81ErrorUtilities.VerifyThrow(eventSource != null, "eventSource is null");
BackEnd\Components\Logging\EvaluationLoggingContext.cs (1)
44ErrorUtilities.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\LoggingContext.cs (16)
93ErrorUtilities.VerifyThrow(_eventContext == null, "eventContext should be null"); 127ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 140ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 168ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 180ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 192ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 206ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 221ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 232ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 246ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 253ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 266ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 280ErrorUtilities.VerifyThrow(_isValid, "must be valid"); 290ErrorUtilities.VerifyThrow(IsValid, "must be valid"); 301ErrorUtilities.VerifyThrow(IsValid, "must be valid"); 312ErrorUtilities.VerifyThrow(IsValid, "must be valid");
BackEnd\Components\Logging\LoggingService.cs (15)
797ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 798ErrorUtilities.VerifyThrow(buildComponentHost != null, "BuildComponentHost was null"); 831ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 901ErrorUtilities.VerifyThrow(packet != null, "packet was null"); 978ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 979ErrorUtilities.VerifyThrow(logger != null, "logger was null"); 1067ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1068ErrorUtilities.VerifyThrow(forwardingLogger != null, "forwardingLogger was null"); 1132ErrorUtilities.VerifyThrow(_serviceState != LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1133ErrorUtilities.VerifyThrow(forwardingLoggerSink != null, "forwardingLoggerSink was null"); 1134ErrorUtilities.VerifyThrow(descriptions != null, "loggerDescriptions was null"); 1135ErrorUtilities.VerifyThrow(descriptions.Count > 0, "loggerDescriptions was null"); 1187ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null"); 1238ErrorUtilities.VerifyThrow(buildEvent != null, "buildEvent is null"); 1289ErrorUtilities.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 (29)
38ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for comment message."); 72ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext was null"); 73ErrorUtilities.VerifyThrow(message != null, "message was null"); 119ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message."); 139ErrorUtilities.VerifyThrow(buildEventContext != null, "Must specify the buildEventContext"); 140ErrorUtilities.VerifyThrow(file != null, "Must specify the associated file."); 141ErrorUtilities.VerifyThrow(message != null, "Need error message."); 185ErrorUtilities.VerifyThrow(invalidProjectFileException != null, "Need exception context."); 186ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext is null"); 239ErrorUtilities.VerifyThrow(taskName != null, "Must specify the name of the task that failed."); 256ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message."); 290ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(taskName), "Must specify the name of the task that failed."); 315ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for warning message."); 332ErrorUtilities.VerifyThrow(file != null, "Must specify the associated file."); 333ErrorUtilities.VerifyThrow(message != null, "Need warning message."); 334ErrorUtilities.VerifyThrow(buildEventContext != null, "Need a BuildEventContext"); 478ErrorUtilities.VerifyThrow(projectEvaluationEventContext != null, "projectBuildEventContext"); 521ErrorUtilities.VerifyThrow(nodeBuildEventContext != null, "Need a nodeBuildEventContext"); 561ErrorUtilities.VerifyThrow(parentBuildEventContext != null, "Need a parentBuildEventContext"); 563ErrorUtilities.VerifyThrow(_configCache.Value.HasConfiguration(configurationId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node."); 597ErrorUtilities.VerifyThrow(projectBuildEventContext != null, "projectBuildEventContext"); 627ErrorUtilities.VerifyThrow(projectBuildEventContext != null, "projectBuildEventContext is null"); 668ErrorUtilities.VerifyThrow(targetBuildEventContext != null, "targetBuildEventContext is null"); 695ErrorUtilities.VerifyThrow(taskBuildEventContext != null, "targetBuildEventContext is null"); 724ErrorUtilities.VerifyThrow(targetBuildEventContext != null, "targetBuildEventContext is null"); 764ErrorUtilities.VerifyThrow(taskBuildEventContext != null, "taskBuildEventContext is null"); 790ErrorUtilities.VerifyThrow(eventName != null, "eventName is null"); 812ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext was null"); 813ErrorUtilities.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."); 61ErrorUtilities.VerifyThrow(this.IsValid, "Build not started."); 73ErrorUtilities.VerifyThrow(this.IsValid, "Build not started.");
BackEnd\Components\Logging\ProjectLoggingContext.cs (2)
165ErrorUtilities.VerifyThrow(this.IsValid, "invalid"); 175ErrorUtilities.VerifyThrow(this.IsValid, "invalid");
BackEnd\Components\Logging\TargetLoggingContext.cs (2)
94ErrorUtilities.VerifyThrow(IsValid, "Should be valid"); 113ErrorUtilities.VerifyThrow(IsValid, "Should be valid");
BackEnd\Components\Logging\TaskLoggingContext.cs (2)
127ErrorUtilities.VerifyThrow(this.IsValid, "invalid"); 146ErrorUtilities.VerifyThrow(IsValid, "must be valid");
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 (1)
680ErrorUtilities.VerifyThrow(projectPathAttribute is not null, "Expected VS to set the project path on each ProjectConfiguration element.");
BackEnd\Components\RequestBuilder\BatchingEngine.cs (2)
297ErrorUtilities.VerifyThrow(itemListsToBeBatched.Count > 0, "Need item types consumed by the batchable object."); 298ErrorUtilities.VerifyThrow(consumedMetadataReferences.Count > 0, "Need item metadata consumed by the batchable object.");
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
79ErrorUtilities.VerifyThrow(lookup != null, "Need lookup.");
BackEnd\Components\RequestBuilder\Lookup.cs (7)
262ErrorUtilities.VerifyThrow(_lookupScopes.Count >= 2, "Too many calls to Leave()."); 601ErrorUtilities.VerifyThrow(existing.Count == 0, "Cannot add an itemgroup of this type."); 814ErrorUtilities.VerifyThrow(!_cloneTable.ContainsKey(cloneItem), "Should be new, not already in table!"); 941ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.Contains(item), "Item should not be in table"); 956ErrorUtilities.VerifyThrow(!tableOfItemsOfSameType.ContainsKey(item), "Item should not be in table"); 988ErrorUtilities.VerifyThrow(_lookupScopes.Count > 1, "Operation in outer scope not supported"); 1221ErrorUtilities.VerifyThrow(modificationType != ModificationType.Update, "Modification type may only be update when a value is specified.");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (28)
200ErrorUtilities.VerifyThrow(_componentHost != null, "Host not set."); 201ErrorUtilities.VerifyThrow(_targetBuilder == null, "targetBuilder not null"); 202ErrorUtilities.VerifyThrow(_nodeLoggingContext == null, "nodeLoggingContext not null"); 203ErrorUtilities.VerifyThrow(_requestEntry == null, "requestEntry not null"); 204ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Cancel already called"); 224ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building"); 225ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated"); 226ErrorUtilities.VerifyThrow(!_continueEvent.WaitOne(0), "Request already continued"); 241ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building"); 242ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated"); 243ErrorUtilities.VerifyThrow(_pendingResourceRequests.Any(), "No pending resource requests"); 338ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 339ErrorUtilities.VerifyThrow(projectFiles.Length == properties.Length, "Properties and project counts not the same"); 340ErrorUtilities.VerifyThrow(projectFiles.Length == toolsVersions.Length, "Tools versions and project counts not the same"); 383ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests"); 473ErrorUtilities.VerifyThrow(!_inMSBuildCallback, "Already in an MSBuild callback!"); 483ErrorUtilities.VerifyThrow(_inMSBuildCallback, "Not in an MSBuild callback!"); 492ErrorUtilities.VerifyThrow(Monitor.IsEntered(monitorLockObject), "Not running under the given lock"); 553ErrorUtilities.VerifyThrow(_componentHost == null, "RequestBuilder already initialized."); 638ErrorUtilities.VerifyThrow(_requestTask == null, "Already have a task."); 680ErrorUtilities.VerifyThrow(_componentHost.LegacyThreadingData.MainThreadSubmissionId != _requestEntry.Request.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request."); 864ErrorUtilities.VerifyThrow(result == null, "Result already set when exception was thrown."); 996ErrorUtilities.VerifyThrow(requests.Length == results.Length, "# results != # requests"); 1014ErrorUtilities.VerifyThrow(!isContinue, "Unexpected null results during continue"); 1105ErrorUtilities.VerifyThrow(_targetBuilder != null, "Target builder is null"); 1297ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedCurrentDirectory != null, "Current directory not previously saved."); 1298ErrorUtilities.VerifyThrow(_requestEntry.RequestConfiguration.SavedEnvironmentVariables != null, "Current environment not previously saved."); 1353ErrorUtilities.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)
694ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes."); 741ErrorUtilities.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."); 605ErrorUtilities.VerifyThrow(inputItemVectors.Count == 1, 709ErrorUtilities.VerifyThrow(numberOfInputItemVectorsWithAllChangedItems <= itemVectorsReferencedInBothTargetInputsAndOutputs.Count, 715ErrorUtilities.VerifyThrow(result == DependencyAnalysisResult.IncrementalBuild, 848ErrorUtilities.VerifyThrow((itemVectorTransforms == null) || (itemVectorCollection.Equals(itemVectorTransforms)) || (itemVectorPartition.Count == 1), 959ErrorUtilities.VerifyThrow((inputs.Count > 0) && (outputs.Count > 0), "Need to specify inputs and outputs."); 962ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 967ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1082ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1087ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1193ErrorUtilities.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."); 494ErrorUtilities.VerifyThrow(howToExecuteTask == TaskExecutionMode.InferOutputsOnly, "should be inferring"); 496ErrorUtilities.VerifyThrow( 665ErrorUtilities.VerifyThrow(executionResult != null, "Unexpected null execution result"); 1151ErrorUtilities.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( 795ErrorUtilities.VerifyThrow(Path.IsPathRooted(referenceFullPath), "Method does not treat path normalization cases");
BackEnd\Shared\BuildResult.cs (3)
206ErrorUtilities.VerifyThrow(request != null, "Must specify a request."); 523ErrorUtilities.VerifyThrow( 543ErrorUtilities.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"); 1558ErrorUtilities.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"); 191ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 243ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key");
Collections\ItemDictionary.cs (2)
329ErrorUtilities.VerifyThrow(String.Equals(itemType, item.Key, StringComparison.OrdinalIgnoreCase), "Item type mismatch"); 360ErrorUtilities.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)
202ErrorUtilities.VerifyThrow(String.Equals(name, value.Key, StringComparison.OrdinalIgnoreCase), "Key must match value's key"); 334ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 418ErrorUtilities.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, "External project");
Construction\ProjectElement.cs (2)
167ErrorUtilities.VerifyThrow(Link == null, "External project"); 264ErrorUtilities.VerifyThrow(Link == null, "External project");
Construction\ProjectElementContainer.cs (14)
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, "External project"); 441ErrorUtilities.VerifyThrow(Link == null, "External project"); 457ErrorUtilities.VerifyThrow(Link == null, "External project"); 477ErrorUtilities.VerifyThrow(Link == null, "External project"); 583ErrorUtilities.VerifyThrow(Link == null, "External project"); 625ErrorUtilities.VerifyThrow(FirstChild == null && LastChild == null, "Expecting no children"); 666ErrorUtilities.VerifyThrow(child.NextSibling == null || child.NextSibling.PreviousSibling != this, "Invalid structure"); 667ErrorUtilities.VerifyThrow(child.PreviousSibling == null || child.PreviousSibling.NextSibling != this, "Invalid structure");
Construction\ProjectRootElement.cs (3)
1773ErrorUtilities.VerifyThrow(document.FullPath == null, "Only virtual documents supported"); 1812ErrorUtilities.VerifyThrow(Link == null, "External project"); 1869ErrorUtilities.VerifyThrow(Link == null, "External project");
Construction\ProjectTaskElement.cs (1)
215ErrorUtilities.VerifyThrow(Link == null, "External project");
Construction\ProjectUsingTaskBodyElement.cs (1)
166ErrorUtilities.VerifyThrow(parentUsingTask.Link == null, "TaskFactory");
Construction\Solution\ProjectInSolution.cs (1)
492ErrorUtilities.VerifyThrow(projectName != null, "Null strings not allowed.");
Construction\Solution\SolutionFile.cs (8)
284ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(solutionFile), "null solution file passed to GetSolutionFileMajorVersion!"); 444ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseFileHeader(): reader is null!"); 470ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(_solutionFile), "ParseSolutionFile() got a null solution file!"); 661ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseFileHeader(): reader is null!"); 726ErrorUtilities.VerifyThrow(versionString != null, "ValidateSolutionFileVersion() got a null line!"); 770ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(firstLine), "ParseProject() got a null firstLine!"); 771ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseProject() got a null reader!"); 1024ErrorUtilities.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"); 3558ErrorUtilities.VerifyThrow(_data.Expander.Metadata == null, "Should be null"); 3737ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 3758ErrorUtilities.VerifyThrow(!IsDirty, "Should not be dirty now"); 3805ErrorUtilities.VerifyThrow(LastEvaluationId == BuildEventContext.InvalidEvaluationId, "This is the first evaluation therefore the last evaluation id is invalid"); 3809ErrorUtilities.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"); 2139ErrorUtilities.VerifyThrow(_buildTimeEventSource == null, "Already registered for build-time."); 2169ErrorUtilities.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"); 258ErrorUtilities.VerifyThrow(line > -1 && column > -1, "Use zero for unknown"); 333ErrorUtilities.VerifyThrow(line > -1 && column > -1, "Use zero for unknown"); 334ErrorUtilities.VerifyThrow(line <= 65535 && column <= 65535, "Use ElementLocation instead");
ElementLocation\XmlDocumentWithLocation.cs (1)
391ErrorUtilities.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\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)
606ErrorUtilities.VerifyThrow(_data.EvaluationId == BuildEventContext.InvalidEvaluationId, "There is no prior evaluation ID. The evaluator data needs to be reset at this point"); 631ErrorUtilities.VerifyThrow(_data.EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 806ErrorUtilities.VerifyThrow(_evaluationProfiler.IsEmpty(), "Evaluation profiler stack is not empty.");
Evaluation\Expander.cs (11)
502ErrorUtilities.VerifyThrow((options & ExpanderOptions.BreakOnNotEmpty) == 0, "not supported"); 910ErrorUtilities.VerifyThrow(metadata != null, "Cannot expand metadata without providing metadata"); 1040ErrorUtilities.VerifyThrow(options != ExpanderOptions.Invalid, "Must be expanding metadata of some kind"); 1048ErrorUtilities.VerifyThrow(itemMetadataMatch.Success, "Need a valid item metadata."); 1171ErrorUtilities.VerifyThrow(properties != null, "Cannot expand properties without providing properties"); 1871ErrorUtilities.VerifyThrow(matches.Count == 1, "Expected just one item vector"); 1882ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items"); 1995ErrorUtilities.VerifyThrow(evaluatedItems != null, "Cannot expand items without providing items"); 2079ErrorUtilities.VerifyThrow(items != null, "Cannot expand items without providing items"); 3922ErrorUtilities.VerifyThrow(_loggingContext != null, $"The logging context is missed. {nameof(IntrinsicFunctions.RegisterBuildCheck)} can not be invoked."); 4919ErrorUtilities.VerifyThrow(cachedTypeInformation.Item1 != null || cachedTypeInformation.Item2 != null, "Function type information needs either string or type represented.");
Evaluation\LazyItemEvaluator.cs (1)
442ErrorUtilities.VerifyThrow(itemsWithNoWildcards.All(fragment => !MSBuildConstants.CharactersForExpansion.Any(fragment.Key.Contains)), $"{nameof(itemsWithNoWildcards)} should not contain any text fragments with wildcards.");
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
125ErrorUtilities.VerifyThrow(
Evaluation\ProjectRootElementCache.cs (3)
108ErrorUtilities.VerifyThrow( 257ErrorUtilities.VerifyThrow( 591ErrorUtilities.VerifyThrow(_weakCache[oldFullPathIfAny] == projectRootElement, "Should already be present");
Evaluation\ProjectStringCache.cs (5)
219ErrorUtilities.VerifyThrow(entry.RefCount > 0, "extra deref"); 223ErrorUtilities.VerifyThrow(Object.ReferenceEquals(entry, _strings[entry.CachedString]), "bad state"); 227ErrorUtilities.VerifyThrow(uniqueEntries.Count == _strings.Count, "bad state"); 295ErrorUtilities.VerifyThrow(_refCount > 0, "extra deref"); 315ErrorUtilities.VerifyThrow(_refCount > 0, "extra deref");
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"); 1137ErrorUtilities.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 (1)
131ErrorUtilities.VerifyThrow(result.SubmissionId == SubmissionId, "GraphBuildResult's submission id doesn't match GraphBuildSubmission's");
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)
68ErrorUtilities.VerifyThrow( 235ErrorUtilities.VerifyThrow(!(isOuterBuild && isInnerBuild), $"A project cannot be an outer and inner build at the same time: ${project.FullPath}"); 270ErrorUtilities.VerifyThrow( 292ErrorUtilities.VerifyThrow(!String.IsNullOrWhiteSpace(globalPropertyName), "Must have an inner build property"); 293ErrorUtilities.VerifyThrow(!String.IsNullOrWhiteSpace(globalPropertyValues), "Must have values for the inner build property");
Instance\ProjectInstance.cs (6)
696ErrorUtilities.VerifyThrow(filter == null || isImmutable, 2201ErrorUtilities.VerifyThrow(ProjectRootElementCache == null, $"{nameof(ProjectRootElementCache)} is already set. Cannot set again"); 2202ErrorUtilities.VerifyThrow(_hostServices == null, $"{nameof(HostServices)} is already set. Cannot set again"); 2203ErrorUtilities.VerifyThrow(TaskRegistry != null, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 3001ErrorUtilities.VerifyThrow(EvaluationId == BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation"); 3023ErrorUtilities.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)
147ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 246ErrorUtilities.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)
807ErrorUtilities.VerifyThrow(initialState == null || initialCount == null, "at most one can be non-null"); 1182ErrorUtilities.VerifyThrow(taskFactoryParameters.Count == 2, "if the parameter dictionary is non-null, it should contain both parameters when we get here!"); 1379ErrorUtilities.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"); 1443ErrorUtilities.VerifyThrow(startedEvent != null, "Project Started should not be null in deferred target started"); 1738ErrorUtilities.VerifyThrow(_startedEvent != null, "Cannot have finished counter without started counter. ");
Logging\SerialConsoleLogger.cs (1)
749ErrorUtilities.VerifyThrow(this.Verbosity < LoggerVerbosity.Detailed,
LogMessagePacketBase.cs (1)
318ErrorUtilities.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)
329ErrorUtilities.VerifyThrow(errorCode == null, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message); 794ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'"); 1162ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
TaskParameter.cs (2)
410ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 477ErrorUtilities.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)
335ErrorUtilities.VerifyThrow(fileList != null, "We must have a list of files here, even if it's empty.");
Utilities\Utilities.cs (2)
79ErrorUtilities.VerifyThrow(s != null, "Need value to set."); 446ErrorUtilities.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.Conversion.Core (48)
OldVSProjectFileReader.cs (1)
554error.VerifyThrow(originalString[indexOfAmpersand] == '&',
ProjectFileConverter.cs (47)
767ErrorUtilities.VerifyThrow(!toRepairImport.Condition.Equals("false", StringComparison.OrdinalIgnoreCase), "RepairImportForAssetCompat should not receive imports with condition=false already"); 1418error.VerifyThrow(propertyGroup != null, "Expected valid ProjectPropertyElementGroup to add properties to."); 1445error.VerifyThrow((visualStudioProjectElement?.Name == VSProjectElements.visualStudioProject), 1449error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 1521error.VerifyThrow(languageElement != null, "Expected valid XML language element."); 1524error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 1835error.VerifyThrow((buildElement?.Name == VSProjectElements.build), "Expected <Build> element."); 1838error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 1841error.VerifyThrow(globalPropertyGroup != null, "Expected valid global ProjectPropertyElementGroup."); 1902error.VerifyThrow((settingsElement?.Name == VSProjectElements.settings), 1906error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 1909error.VerifyThrow(globalPropertyGroup != null, "Expected valid global ProjectPropertyElementGroup."); 2027error.VerifyThrow((configElement?.Name == VSProjectElements.config), 2031error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 2270error.VerifyThrow((platformElement?.Name == VSProjectElements.platform), 2274error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 2362error.VerifyThrow((interopRegistrationElement?.Name == VSProjectElements.interopRegistration), 2366error.VerifyThrow(configPropertyGroup != null, 2418error.VerifyThrow((referencesElement?.Name == VSProjectElements.references), 2422error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object."); 2502error.VerifyThrow((referenceElement?.Name == VSProjectElements.reference), 2507error.VerifyThrow(referencesItemGroup != null, "Received null ProjectItemGroupElement"); 2789error.VerifyThrow(this.solutionFile == null, "Solution file already passed in!"); 2790error.VerifyThrow(this.projectGuid != null, "Need project Guid to find solution file."); 2854error.VerifyThrow(from.IndexOf("*", StringComparison.Ordinal) == -1, "Bug: RelativePathTo can't handle wild cards."); 2855error.VerifyThrow(to.IndexOf("*", StringComparison.Ordinal) == -1, "Bug: RelativePathTo can't handle wild cards."); 2881error.VerifyThrow(referencedProjectGuid != null, "Need valid project guid."); 2950error.VerifyThrow((importsElement?.Name == VSProjectElements.imports), 2955error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object."); 3014error.VerifyThrow((importElement?.Name == VSProjectElements.import), 3019error.VerifyThrow(importsItemGroup != null, "Received null ProjectItemGroupElement"); 3066error.VerifyThrow((filesElement?.Name == VSProjectElements.files), 3071error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object."); 3132error.VerifyThrow((includeElement?.Name == VSProjectElements.include), 3137error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object."); 3201error.VerifyThrow((fileElement?.Name == VSProjectElements.file), 3206error.VerifyThrow(filesItemGroup != null, "Received null ProjectItemGroupElement"); 3390error.VerifyThrow((folderElement?.Name == VSProjectElements.folder), 3395error.VerifyThrow(filesItemGroup != null, "Received null ProjectItemGroupElement"); 3538error.VerifyThrow((startupServicesElement?.Name == VSProjectElements.startupServices), 3543error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object."); 3602error.VerifyThrow((serviceElement?.Name == VSProjectElements.service), 3607error.VerifyThrow(startupServicesItemGroup != null, "Received null ProjectItemGroupElement"); 3654error.VerifyThrow((otherProjectSettingsElement?.Name == VSProjectElements.otherProjectSettings), 3659error.VerifyThrow(globalPropertyGroup != null, "Expected valid global ProjectPropertyElementGroup."); 3710error.VerifyThrow((userPropertiesElement?.Name == VSProjectElements.userProperties), 3796error.VerifyThrow(false, "This project is not recognized as one of the following 3 languages: C#, VB, VJ#");
Microsoft.Build.Engine.UnitTests (3)
ErrorUtilities_Tests.cs (3)
21ErrorUtilities.VerifyThrow(false, "msbuild rules"); 36ErrorUtilities.VerifyThrow(true, "msbuild rules"); 43ErrorUtilities.VerifyThrow(true, "blah");