1609 references to ErrorUtilities
Microsoft.Build (1594)
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.");
AwaitExtensions.cs (3)
58ErrorUtilities.VerifyThrowArgumentNull(handle); 69ErrorUtilities.VerifyThrowArgumentNull(handles, "handle"); 98ErrorUtilities.VerifyThrowArgumentNull(handles, "handle");
BackEnd\BuildManager\BuildManager.cs (23)
290ErrorUtilities.VerifyThrowArgumentNull(hostName); 728ErrorUtilities.VerifyThrowInvalidOperation(NativeMethodsShared.ProcessorArchitecture == NativeMethodsShared.ProcessorArchitectures.X64, "ReportFileAccessesX64Only"); 858ErrorUtilities.VerifyThrow(configuration.Project != null, "Configuration should have been loaded."); 891ErrorUtilities.VerifyThrowArgumentNull(requestData); 977ErrorUtilities.VerifyThrow(_buildSubmissions.Count == 0, "All submissions not yet complete."); 978ErrorUtilities.VerifyThrow(_activeNodes.Count == 0, "All nodes not yet shut down."); 1233ErrorUtilities.VerifyThrowArgumentNull(submission); 1234ErrorUtilities.VerifyThrow(!submission.IsCompleted, "Submission already complete."); 1250ErrorUtilities.VerifyThrowArgument( 1273ErrorUtilities.VerifyThrow( 1347ErrorUtilities.VerifyThrow(resolvedConfiguration is not null, "Cannot call project cache without having BuildRequestConfiguration"); 1468ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(config.ProjectFullPath), "{0} is not a solution", config.ProjectFullPath); 1640ErrorUtilities.ThrowInternalError("Unexpected packet received by BuildManager: {0}", packet.Type); 1960ErrorUtilities.VerifyThrow( 2106ErrorUtilities.ThrowInvalidOperation(exceptionResouorce); 2115ErrorUtilities.VerifyThrowInvalidOperation(_buildManagerState == requiredState, exceptionResouorce); 2125ErrorUtilities.ThrowInternalError("Expected state {0}, actual state {1}", requiredState, _buildManagerState); 2467ErrorUtilities.VerifyThrow(_activeNodes.Contains(node), "Unexpected shutdown from node {0} which shouldn't exist.", node); 2670ErrorUtilities.ThrowInternalError("Scheduling action {0} not handled.", response.Action); 3079ErrorUtilities.ThrowInternalError("Incorrect packet type: {0} should have been {1}", packet.Type, expectedType); 3166ErrorUtilities.VerifyThrowInternalNull(inputCacheFiles); 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\BuildParameters.cs (6)
243ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 268ErrorUtilities.VerifyThrowInternalNull(other); 444ErrorUtilities.VerifyThrowArgumentNull(logger, nameof(ForwardingLoggers), "NullLoggerNotAllowed"); 504ErrorUtilities.VerifyThrowArgumentNull(logger, "Loggers", "NullLoggerNotAllowed"); 521ErrorUtilities.VerifyThrowArgument(value > 0, "InvalidMaxNodeCount"); 713ErrorUtilities.VerifyThrowInternalNull(value, "EnvironmentPropertiesInternal");
BackEnd\BuildManager\BuildRequestData.cs (6)
67ErrorUtilities.VerifyThrowArgumentNull(projectInstance); 71ErrorUtilities.VerifyThrowArgumentNull(targetName, "target"); 96ErrorUtilities.VerifyThrowArgumentNull(requestedProjectState); 130ErrorUtilities.VerifyThrowArgumentNull(requestedProjectState); 147ErrorUtilities.VerifyThrowArgumentLength(projectFullPath); 148ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
BackEnd\BuildManager\BuildRequestDataBase.cs (2)
16ErrorUtilities.VerifyThrowArgumentNull(targetNames); 19ErrorUtilities.VerifyThrowArgumentNull(targetName, "target");
BackEnd\BuildManager\BuildSubmission.cs (6)
38ErrorUtilities.VerifyThrowArgumentNull(requestData); 69ErrorUtilities.VerifyThrowInvalidOperation(!IsCompleted, "SubmissionAlreadyComplete"); 80ErrorUtilities.VerifyThrowArgumentNull(result); 199ErrorUtilities.VerifyThrow(BuildResult != null, 217ErrorUtilities.VerifyThrow(BuildRequest != null, 230ErrorUtilities.ThrowInternalError("BuildResult configuration ({0}) doesn't match BuildRequest configuration ({1})",
BackEnd\BuildManager\BuildSubmissionBase.cs (1)
43ErrorUtilities.VerifyThrowArgumentNull(buildManager);
BackEnd\BuildManager\CacheAggregator.cs (7)
32ErrorUtilities.VerifyThrowInternalNull(configCache); 33ErrorUtilities.VerifyThrowInternalNull(resultsCache); 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\CacheSerialization.cs (5)
22ErrorUtilities.VerifyThrowInternalNull(outputCacheFile); 52ErrorUtilities.ThrowInternalErrorUnreachable(); 65ErrorUtilities.ThrowInternalErrorUnreachable(); 130ErrorUtilities.VerifyThrowInternalNull(configCache); 131ErrorUtilities.VerifyThrowInternalNull(resultsCache);
BackEnd\BuildManager\LegacyThreadingData.cs (8)
58ErrorUtilities.VerifyThrow(_instanceForMainThread == null || (_instanceForMainThread != null && value == null) || (_instanceForMainThread == value), "Should not assign to instanceForMainThread twice without cleaning it"); 91ErrorUtilities.VerifyThrow(!_legacyThreadingEventsById.ContainsKey(submissionId), "Submission {0} should not already be registered with LegacyThreadingData", submissionId); 107ErrorUtilities.VerifyThrow(_legacyThreadingEventsById.ContainsKey(submissionId), "Submission {0} should have been previously registered with LegacyThreadingData", submissionId); 130ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to wait on the legacy thread for submission {0}, but that submission has not been registered.", submissionId); 148ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to track when the legacy thread for submission {0} goes inactive, but that submission has not been registered.", submissionId); 158ErrorUtilities.VerifyThrow( 171ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to signal that the legacy thread is ready for submission {0} to execute, but that submission has not been registered", submissionId); 193ErrorUtilities.VerifyThrow(legacyThreadingEvents != null, "We're trying to signal that submission {0} is done with the legacy thread, but that submission has not been registered", submissionId);
BackEnd\Client\MSBuildClientPacketPump.cs (5)
78ErrorUtilities.VerifyThrowArgumentNull(stream); 247ErrorUtilities.ThrowInternalError("Server disconnected abruptly"); 251ErrorUtilities.ThrowInternalError("Incomplete header read. {0} of {1} bytes read", headerBytesRead, headerByte.Length); 270ErrorUtilities.ThrowInternalError("Incomplete packet read. {0} of {1} bytes read", packetBytesRead, packetLength); 304ErrorUtilities.ThrowInternalError("WaitId {0} out of range.", waitId);
BackEnd\Components\BuildComponentFactoryCollection.cs (3)
135ErrorUtilities.VerifyThrow(_componentEntriesByType[componentType].Pattern == CreationPattern.Singleton, "Previously existing factory for type {0} was not a singleton factory.", componentType); 159ErrorUtilities.ThrowInternalError("No factory registered for component type {0}", type); 241ErrorUtilities.VerifyThrow(Pattern == CreationPattern.Singleton, "Cannot shutdown non-singleton.");
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (26)
190ErrorUtilities.VerifyThrow(_componentHost != null, "BuildRequestEngine not initialized by component host."); 191ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Uninitialized, "Engine must be in the Uninitiailzed state, but is {0}", _status); 216ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Active || _status == BuildRequestEngineStatus.Idle || _status == BuildRequestEngineStatus.Waiting, "Engine must be Active, Idle or Waiting to clean up, but is {0}.", _status); 218ErrorUtilities.VerifyThrow(_nodeLoggingContext != null, "Node logging context not set."); 302ErrorUtilities.ThrowInternalError("Failure during engine shutdown. Exception: {0}", e.ToString()); 330ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status); 333ErrorUtilities.VerifyThrow(!_requestsByGlobalRequestId.ContainsKey(request.GlobalRequestId), "Request {0} is already known to the engine.", request.GlobalRequestId); 334ErrorUtilities.VerifyThrow(_configCache.HasConfiguration(request.ConfigurationId), "Request {0} refers to configuration {1} which is not known to the engine.", request.GlobalRequestId, request.ConfigurationId); 400ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status); 401ErrorUtilities.VerifyThrow(_requestsByGlobalRequestId.ContainsKey(unblocker.BlockedRequestId), "Request {0} is not known to the engine.", unblocker.BlockedRequestId); 501ErrorUtilities.VerifyThrow(_status != BuildRequestEngineStatus.Shutdown && _status != BuildRequestEngineStatus.Uninitialized, "Engine loop not yet started, status is {0}.", _status); 504ErrorUtilities.VerifyThrow(_componentHost != null, "No host object set"); 593ErrorUtilities.VerifyThrowArgumentNull(host); 594ErrorUtilities.VerifyThrow(_componentHost == null, "BuildRequestEngine already initialized!"); 612ErrorUtilities.VerifyThrow(_status == BuildRequestEngineStatus.Uninitialized, "Cleanup wasn't called, status is {0}", _status); 625ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestEngine, "Cannot create component of type {0}", type); 734ErrorUtilities.VerifyThrow(activeEntry == null, "Multiple active requests"); 760ErrorUtilities.ThrowInternalError("Unexpected BuildRequestEntry state " + currentEntry.State); 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"); 1333ErrorUtilities.VerifyThrowArgumentNull(config); 1334ErrorUtilities.VerifyThrow(_unresolvedConfigurations.HasConfiguration(config.ConfigurationId), "NoUnresolvedConfiguration"); 1345ErrorUtilities.VerifyThrowArgumentNull(blocker); 1400ErrorUtilities.ThrowInternalError(e.Message, e);
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (24)
125ErrorUtilities.VerifyThrowArgumentNull(request); 126ErrorUtilities.VerifyThrowArgumentNull(requestConfiguration); 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."); 217ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active, "Must be in Active state to wait for blocking request. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State); 306ErrorUtilities.VerifyThrowArgumentNull(result); 307ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Waiting || _outstandingRequests == null, "Entry must be in the Waiting state to report results, or we must have flushed our requests due to an error. Config: {0} State: {1} Requests: {2}", RequestConfiguration.ConfigurationId, State, _outstandingRequests != null); 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."); 385ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Waiting, "Entry must be in the waiting state to be unblocked. Config: {0} State: {1} Request: {2}", RequestConfiguration.ConfigurationId, State, Request.GlobalRequestId); 386ErrorUtilities.VerifyThrow(_blockingGlobalRequestId != BuildRequest.InvalidGlobalRequestId, "Entry must be waiting on another request to be unblocked. Config: {0} Request: {1}", RequestConfiguration.ConfigurationId, Request.GlobalRequestId); 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."); 405ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Ready, "Entry must be in the Ready state. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State); 474ErrorUtilities.VerifyThrowArgumentNull(result); 475ErrorUtilities.VerifyThrow(Result == null, "Entry already Completed."); 482ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active, "Entry must be active before it can be Completed successfully. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State); 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."); 500ErrorUtilities.VerifyThrow(State == BuildRequestEntryState.Active || State == BuildRequestEntryState.Waiting, "Must be in Active or Waiting state to wait for results. Config: {0} State: {1}", RequestConfiguration.ConfigurationId, State); 506ErrorUtilities.VerifyThrow(!_outstandingRequests.ContainsKey(newRequest.NodeRequestId), "Already waiting for local request {0}", newRequest.NodeRequestId); 511ErrorUtilities.VerifyThrow(addToIssueList, "Requests with unresolved configurations should always be added to the issue list.");
BackEnd\Components\BuildRequestEngine\FullyQualifiedBuildRequest.cs (2)
38ErrorUtilities.VerifyThrowArgumentNull(config); 39ErrorUtilities.VerifyThrowArgumentNull(targets);
BackEnd\Components\Caching\ConfigCache.cs (9)
76ErrorUtilities.VerifyThrowArgumentNull(config); 77ErrorUtilities.VerifyThrow(config.ConfigurationId != 0, "Invalid configuration ID"); 82ErrorUtilities.VerifyThrow(!_configurations.ContainsKey(configId), "Configuration {0} already cached", config.ConfigurationId); 110ErrorUtilities.VerifyThrowArgumentNull(config); 121ErrorUtilities.VerifyThrowArgumentNull(configMetadata); 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."); 344ErrorUtilities.VerifyThrowArgumentNull(host); 391ErrorUtilities.VerifyThrow(componentType == BuildComponentType.ConfigCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Caching\ConfigCacheWithOverride.cs (5)
46ErrorUtilities.ThrowInternalErrorUnreachable(); 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 (3)
39ErrorUtilities.VerifyThrow(IsCollectionEmptyOrUncreated(RegisteredTaskObjectLifetime.Build), "Build lifetime objects were not disposed at the end of the build"); 62ErrorUtilities.VerifyThrow(type == BuildComponentType.RegisteredTaskObjectCache, "Cannot create components of type {0}", type); 73ErrorUtilities.VerifyThrow(IsCollectionEmptyOrUncreated(RegisteredTaskObjectLifetime.Build), "Build lifetime objects were not disposed at the end of the build");
BackEnd\Components\Caching\ResultsCache.cs (6)
86ErrorUtilities.ThrowInternalError("Failed to add result for configuration {0}", result.ConfigurationId); 115ErrorUtilities.VerifyThrow(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest"); 123ErrorUtilities.VerifyThrow(result.HasResultsForTarget(target), "No results in cache for target " + target); 168ErrorUtilities.VerifyThrow(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest"); 284ErrorUtilities.VerifyThrowArgumentNull(host); 302ErrorUtilities.VerifyThrow(componentType == BuildComponentType.ResultsCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Caching\ResultsCacheWithOverride.cs (4)
37ErrorUtilities.ThrowInternalErrorUnreachable(); 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\DetouredNodeLauncher.cs (3)
34ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.NodeLauncher, nameof(type)); 61ErrorUtilities.VerifyThrowInternalLength(msbuildLocation, nameof(msbuildLocation)); 63ErrorUtilities.VerifyThrowInternalNull(_fileAccessManager, nameof(_fileAccessManager));
BackEnd\Components\Communications\NodeEndpointInProc.cs (19)
104ErrorUtilities.VerifyThrowArgumentNull(host); 165ErrorUtilities.VerifyThrowInternalNull(factory); 183ErrorUtilities.VerifyThrowInternalNull(factory); 213ErrorUtilities.VerifyThrow(_status == LinkStatus.Active, "Cannot send when link status is not active. Current status {0}", _status); 304ErrorUtilities.VerifyThrow(_status == LinkStatus.Active, "Endpoint is not connected. Current status {0}", _status); 321ErrorUtilities.VerifyThrow(_status != newStatus, "Attempting to change status to existing status {0}.", _status); 334ErrorUtilities.VerifyThrowArgumentNull(packet); 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"); 446ErrorUtilities.ThrowInternalError("waitId {0} out of range.", waitId);
BackEnd\Components\Communications\NodeLauncher.cs (2)
23ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.NodeLauncher, nameof(type)); 51ErrorUtilities.VerifyThrowInternalLength(msbuildLocation, nameof(msbuildLocation));
BackEnd\Components\Communications\NodeManager.cs (6)
126ErrorUtilities.ThrowInternalError("Node {0} does not have a provider.", node); 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"); 280ErrorUtilities.VerifyThrow(type == BuildComponentType.NodeManager, "Cannot create component of type {0}", type); 309ErrorUtilities.ThrowInternalError("No node provider provided.");
BackEnd\Components\Communications\NodeProviderInProc.cs (12)
159ErrorUtilities.VerifyThrowArgumentOutOfRange(nodeId == _inProcNodeId, "node"); 160ErrorUtilities.VerifyThrowArgumentNull(packet); 220ErrorUtilities.VerifyThrow(nodeId != InvalidInProcNodeId, "Cannot create in-proc node."); 273ErrorUtilities.ThrowInternalErrorUnreachable(); 282ErrorUtilities.ThrowInternalErrorUnreachable(); 291ErrorUtilities.ThrowInternalErrorUnreachable(); 352ErrorUtilities.VerifyThrow(type == BuildComponentType.InProcNodeProvider, "Cannot create component of type {0}", type); 363ErrorUtilities.VerifyThrow(_inProcNode == null, "In Proc node already instantiated."); 364ErrorUtilities.VerifyThrow(_inProcNodeEndpoint == null, "In Proc node endpoint already instantiated."); 397ErrorUtilities.VerifyThrow(connected, "In-proc node failed to start up within {0}ms", connectionTimeout); 422ErrorUtilities.VerifyThrow(endpoint == _inProcNodeEndpoint, "Received link status event for a node other than our peer."); 442ErrorUtilities.ThrowInternalError("Unexpected shutdown code {0} received.", reason);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (4)
81ErrorUtilities.VerifyThrowArgumentNull(factory); 87ErrorUtilities.ThrowInternalError("Exceeded max node count of '{0}', current count is '{1}' ", ComponentHost.BuildParameters.MaxNodeCount, _nodeContexts.Count); 134ErrorUtilities.VerifyThrow(_nodeContexts.ContainsKey(nodeId), "Invalid node id specified: {0}.", nodeId); 197ErrorUtilities.VerifyThrow(componentType == BuildComponentType.OutOfProcNodeProvider, "Factory cannot create components of type {0}", componentType);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
98ErrorUtilities.VerifyThrowArgumentNull(packet); 258ErrorUtilities.ThrowInternalError("Cannot acquire required number of nodes.", new AggregateException(exceptions.ToArray()));
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (10)
186ErrorUtilities.VerifyThrow(_nodeContexts.ContainsKey(hostContext), "Invalid host context specified: {0}.", hostContext.ToString()); 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"); 350ErrorUtilities.VerifyThrow(componentType == BuildComponentType.OutOfProcTaskHostNodeProvider, "Factory cannot create components of type {0}", componentType); 377ErrorUtilities.VerifyThrowInternalErrorUnreachable((hostContext & HandshakeOptions.TaskHost) == HandshakeOptions.TaskHost); 414ErrorUtilities.VerifyThrowInternalErrorUnreachable((hostContext & HandshakeOptions.TaskHost) == HandshakeOptions.TaskHost); 419ErrorUtilities.ThrowInternalError("ARM64 CLR2 task hosts are not supported."); 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?"); 530ErrorUtilities.VerifyThrowArgumentNull(factory); 531ErrorUtilities.VerifyThrow(!_nodeIdToPacketFactory.ContainsKey((int)hostContext), "We should not already have a factory for this context! Did we forget to call DisconnectFromHost somewhere?"); 535ErrorUtilities.ThrowInternalError("All allowable nodes already created ({0}).", _nodeContexts.Count);
BackEnd\Components\Communications\TaskHostNodeManager.cs (4)
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"); 169ErrorUtilities.VerifyThrow(type == BuildComponentType.TaskHostNodeManager, "Cannot create component of type {0}", type);
BackEnd\Components\Communications\TranslatorExtensions.cs (4)
74ErrorUtilities.VerifyThrow(type != null, "type cannot be null"); 75ErrorUtilities.VerifyThrow( 78ErrorUtilities.VerifyThrow( 88ErrorUtilities.VerifyThrow(
BackEnd\Components\FileAccesses\FileAccessManager.cs (2)
39ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.FileAccessManager, nameof(type)); 164ErrorUtilities.VerifyThrow(
BackEnd\Components\FileAccesses\OutOfProcNodeFileAccessManager.cs (1)
28ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.FileAccessManager, nameof(type));
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (3)
42ErrorUtilities.VerifyThrow(sendData != null, "sendData delegate is null"); 127ErrorUtilities.ThrowInternalError("Do not use this method for the transport sink"); 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\EventSourceSink.cs (1)
289ErrorUtilities.ThrowInternalError("Unknown event args type.");
BackEnd\Components\Logging\ForwardingLoggerRecord.cs (1)
24ErrorUtilities.VerifyThrowArgumentNull(forwardingLoggerDescription);
BackEnd\Components\Logging\LoggingContext.cs (3)
45ErrorUtilities.VerifyThrowArgumentNull(loggingService); 46ErrorUtilities.VerifyThrowArgumentNull(eventContext); 330ErrorUtilities.ThrowInternalError("LoggingContext (type: {0}) was not valid during logging attempt.",
BackEnd\Components\Logging\LoggingService.cs (18)
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"); 968ErrorUtilities.ThrowInternalError("Expected packet type \"{0}\" but instead got packet type \"{1}\".", nameof(NodePacketType.LogMessage), packet.Type.ToString()); 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."); 1557ErrorUtilities.ThrowInternalError("Unknown logging item in queue:" + loggingEvent.GetType().FullName); 1937ErrorUtilities.ThrowInternalError("ContextID {0} should have been in the ID-to-project file mapping but wasn't!", context.ProjectContextId);
BackEnd\Components\Logging\LoggingServiceFactory.cs (1)
51ErrorUtilities.VerifyThrow(type == BuildComponentType.LoggingService, "Cannot create components of type {0}", type);
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (31)
41ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for comment message."); 113ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message."); 138ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId); 156ErrorUtilities.VerifyThrow(invalidProjectFileException != null, "Need exception context."); 157ErrorUtilities.VerifyThrow(buildEventContext != null, "buildEventContext is null"); 178ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId); 210ErrorUtilities.VerifyThrow(taskName != null, "Must specify the name of the task that failed."); 227ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for error message."); 261ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(taskName), "Must specify the name of the task that failed."); 286ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(messageResourceName), "Need resource string for warning message."); 303ErrorUtilities.VerifyThrow(file != null, "Must specify the associated file."); 304ErrorUtilities.VerifyThrow(message != null, "Need warning message."); 305ErrorUtilities.VerifyThrow(buildEventContext != null, "Need a BuildEventContext"); 330ErrorUtilities.VerifyThrow(projectFile != null, "ContextID {0} should have been in the ID-to-project file mapping but wasn't!", buildEventContext.ProjectContextId); 458ErrorUtilities.VerifyThrow(projectEvaluationEventContext != null, "projectBuildEventContext"); 534ErrorUtilities.VerifyThrow(nodeBuildEventContext != null, "Need a nodeBuildEventContext"); 543ErrorUtilities.ThrowInternalError("ContextID {0} for project {1} should not already be in the ID-to-file mapping!", projectContextId, projectFile); 555ErrorUtilities.ThrowInternalError("ContextID {0} was already in the ID-to-project file mapping but the project file {1} did not match the provided one {2}!", projectContextId, existingProjectFile, projectFile); 565ErrorUtilities.ThrowInternalError("ContextID {0} should have been in the ID-to-project file mapping but wasn't!", projectContextId); 574ErrorUtilities.VerifyThrow(parentBuildEventContext != null, "Need a parentBuildEventContext"); 576ErrorUtilities.VerifyThrow(_configCache.Value.HasConfiguration(configurationId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node."); 608ErrorUtilities.VerifyThrow(projectBuildEventContext != null, "projectBuildEventContext"); 621ErrorUtilities.ThrowInternalError("ContextID {0} for project {1} should be in the ID-to-file mapping!", projectBuildEventContext.ProjectContextId, projectFile); 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 (3)
64ErrorUtilities.VerifyThrow( 92ErrorUtilities.VerifyThrowArgumentLength(targetResults); 99ErrorUtilities.VerifyThrow(resultType != CacheResultType.CacheHit, "CantBeCacheHit");
BackEnd\Components\ProjectCache\ProjectCacheException.cs (6)
20ErrorUtilities.ThrowInternalErrorUnreachable(); 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 (8)
217ErrorUtilities.VerifyThrowArgumentNull(projectCacheDescriptor.PluginAssemblyPath, nameof(projectCacheDescriptor.PluginAssemblyPath)); 480ErrorUtilities.VerifyThrow(submission.BuildRequestData != null, 503ErrorUtilities.VerifyThrowInternalNull(buildRequest.ProjectInstance, nameof(buildRequest.ProjectInstance)); 540ErrorUtilities.VerifyThrow(plugin.Instance != null, "Plugin '{0}' instance is null", plugin.Name); 671ErrorUtilities.VerifyThrowInternalNull(projectConfiguration.Attributes, nameof(projectConfiguration.Attributes)); 683ErrorUtilities.VerifyThrow(projectPathAttribute is not null, "Expected VS to set the project path on each ProjectConfiguration element."); 711ErrorUtilities.VerifyThrowInternalNull(requestConfiguration.Project, nameof(requestConfiguration.Project)); 770ErrorUtilities.VerifyThrow(plugin.Instance != null, "Plugin '{0}' instance is null", plugin.Name);
BackEnd\Components\ProjectCache\ProxyTargets.cs (1)
36ErrorUtilities.VerifyThrowArgumentLength(proxyTargetToRealTargetMap);
BackEnd\Components\RequestBuilder\BatchingEngine.cs (4)
110ErrorUtilities.ThrowInternalError("Need the parameters of the batchable object to determine if it can be batched."); 115ErrorUtilities.ThrowInternalError("Need to specify the lookup."); 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\IntrinsicTask.cs (1)
80ErrorUtilities.ThrowInternalError("Unhandled intrinsic task type {0}", taskInstance.GetType().GetTypeInfo().BaseType);
BackEnd\Components\RequestBuilder\IntrinsicTasks\IntrinsicTaskFactory.cs (2)
52ErrorUtilities.ThrowInternalError("Unexpected task name {0}. Expected {1}", taskName, TaskType.Name); 87ErrorUtilities.ThrowInternalError("Unexpected intrinsic task type {0}", TaskType);
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
253ErrorUtilities.ThrowInternalErrorUnreachable();
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (4)
185ErrorUtilities.ThrowInternalError("Unexpected case {0}", _skipNonExistentProjects); 189ErrorUtilities.ThrowInternalErrorUnreachable(); 389ErrorUtilities.VerifyThrow(skipNonExistProjects == SkipNonExistentProjectsBehavior.Error, "skipNonexistentProjects has unexpected value {0}", skipNonExistProjects); 740ErrorUtilities.VerifyThrowArgument(ConversionUtilities.CanConvertStringToBool(value), "MSBuild.InvalidSkipNonexistentProjectValue");
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
83ErrorUtilities.VerifyThrow(lookup != null, "Need lookup.");
BackEnd\Components\RequestBuilder\Lookup.cs (12)
94ErrorUtilities.VerifyThrowInternalNull(projectItems); 95ErrorUtilities.VerifyThrowInternalNull(properties); 263ErrorUtilities.VerifyThrow(_lookupScopes.Count >= 2, "Too many calls to Leave()."); 264ErrorUtilities.VerifyThrow(Object.ReferenceEquals(scopeToLeave, _lookupScopes.First.Value), "Attempting to leave with scope '{0}' but scope '{1}' is on top of the stack.", scopeToLeave.Description, _lookupScopes.First.Value.Description); 455ErrorUtilities.VerifyThrowInternalLength(name, nameof(name)); 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"); 1182ErrorUtilities.VerifyThrowInternalNull(value, "value"); 1240ErrorUtilities.VerifyThrow(modificationType != ModificationType.Update, "Modification type may only be update when a value is specified.");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (43)
199ErrorUtilities.VerifyThrowArgumentNull(loggingContext); 200ErrorUtilities.VerifyThrowArgumentNull(entry); 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"); 231ErrorUtilities.VerifyThrow(_blockType == BlockType.BlockedOnTargetInProgress || _blockType == BlockType.Yielded || (_continueResults != null), "Unexpected null results for request {0} (nr {1})", _requestEntry.Request.GlobalRequestId, _requestEntry.Request.NodeRequestId); 242ErrorUtilities.VerifyThrow(HasActiveBuildRequest, "Request not building"); 243ErrorUtilities.VerifyThrow(!_terminateEvent.WaitOne(0), "Request already terminated"); 244ErrorUtilities.VerifyThrow(_pendingResourceRequests.Any(), "No pending resource requests"); 306ErrorUtilities.ThrowInvalidOperation("UnableToCancel"); 335ErrorUtilities.VerifyThrowArgumentNull(projectFiles); 336ErrorUtilities.VerifyThrowArgumentNull(properties); 337ErrorUtilities.VerifyThrowArgumentNull(targets); 338ErrorUtilities.VerifyThrowArgumentNull(toolsVersions); 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"); 553ErrorUtilities.VerifyThrowArgumentNull(host); 554ErrorUtilities.VerifyThrow(_componentHost == null, "RequestBuilder already initialized."); 630ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestBuilder, "Cannot create components of type {0}", type); 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."); 746ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Ready, "Entry is not in the Ready state, it is in the {0} state.", _requestEntry.State); 754ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Active, "Entry is not in the Active state, it is in the {0} state.", _requestEntry.State); 762ErrorUtilities.VerifyThrow(_requestEntry.State == BuildRequestEntryState.Active || _requestEntry.State == BuildRequestEntryState.Waiting, 855ErrorUtilities.ThrowInternalError(ex.Message, ex); 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"); 1200ErrorUtilities.VerifyThrow( 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 (14)
105ErrorUtilities.VerifyThrowArgumentNull(loggingContext, "projectLoggingContext"); 106ErrorUtilities.VerifyThrowArgumentNull(entry); 107ErrorUtilities.VerifyThrowArgumentNull(callback, "requestBuilderCallback"); 108ErrorUtilities.VerifyThrowArgumentNull(targetNames); 109ErrorUtilities.VerifyThrowArgumentNull(baseLookup); 110ErrorUtilities.VerifyThrow(targetNames.Length > 0, "List of targets must be non-empty"); 111ErrorUtilities.VerifyThrow(_componentHost != null, "InitializeComponent must be called before building targets."); 215ErrorUtilities.VerifyThrowArgumentNull(host); 280ErrorUtilities.VerifyThrow(pushed, "Failed to push any targets onto the stack. Target: {0} Current Target: {1}", targets[i], currentTargetEntry.Target.Name); 333ErrorUtilities.ThrowInternalError("This method should never be called by anyone except the TargetBuilder."); 394ErrorUtilities.VerifyThrow(type == BuildComponentType.TargetBuilder, "Cannot create components of type {0}", type); 479ErrorUtilities.VerifyThrow(!wasActivelyBuilding, "Target {0} was actively building and waited on but we are attempting to build it again.", currentTargetEntry.Name); 537ErrorUtilities.ThrowInternalError("Unexpected target state {0}", currentTargetEntry.State); 552ErrorUtilities.VerifyThrowInternalNull(targetResult, "targetResult");
BackEnd\Components\RequestBuilder\TargetEntry.cs (13)
178ErrorUtilities.VerifyThrowArgumentNull(requestEntry); 179ErrorUtilities.VerifyThrowArgumentNull(targetBuilderCallback); 180ErrorUtilities.VerifyThrowArgumentNull(targetSpecification, "targetName"); 181ErrorUtilities.VerifyThrowArgumentNull(baseLookup, "lookup"); 182ErrorUtilities.VerifyThrowArgumentNull(host); 425ErrorUtilities.VerifyThrow(!_isExecuting, "Target {0} is already executing", _target.Name); 700ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes."); 747ErrorUtilities.VerifyThrow(_legacyCallTargetScopes == null, "We should have already left any legacy call target scopes."); 772ErrorUtilities.VerifyThrow(_state != TargetEntryState.Completed, "State must not be Completed. State is {0}.", _state); 783ErrorUtilities.VerifyThrow(_state == TargetEntryState.Completed, "State must be Completed. State is {0}.", _state); 784ErrorUtilities.VerifyThrow(_targetResult.ResultCode == TargetResultCode.Skipped, "ResultCode must be Skipped. ResultCode is {0}.", _state); 785ErrorUtilities.VerifyThrow(_targetResult.WorkUnitResult.ActionCode == WorkUnitActionCode.Continue, "ActionCode must be Continue. ActionCode is {0}.", _state); 899ErrorUtilities.VerifyThrow(actual == expected, "Expected state {1}. Got {0}", actual, expected);
BackEnd\Components\RequestBuilder\TargetSpecification.cs (2)
32ErrorUtilities.VerifyThrowArgumentLength(targetName); 33ErrorUtilities.VerifyThrowArgumentNull(referenceLocation);
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (24)
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, 849ErrorUtilities.VerifyThrow(!itemVectorCollection[itemVectorType].ContainsKey(item), "ItemVectorPartition already contains a vector for items with the expression '{0}'", item); 852ErrorUtilities.VerifyThrow((itemVectorTransforms == null) || (itemVectorCollection.Equals(itemVectorTransforms)) || (itemVectorPartition.Count == 1), 963ErrorUtilities.VerifyThrow((inputs.Count > 0) && (outputs.Count > 0), "Need to specify inputs and outputs."); 966ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 971ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 982ErrorUtilities.ThrowIfTypeDoesNotImplementToString(outputs[0]); 1000ErrorUtilities.ThrowIfTypeDoesNotImplementToString(inputs[0]); 1008ErrorUtilities.ThrowIfTypeDoesNotImplementToString(outputs[i]); 1026ErrorUtilities.ThrowIfTypeDoesNotImplementToString(inputs[0]); 1043ErrorUtilities.ThrowIfTypeDoesNotImplementToString(input); 1086ErrorUtilities.VerifyThrow(inputs[0] is string || inputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1091ErrorUtilities.VerifyThrow(outputs[0] is string || outputs[0] is ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1099ErrorUtilities.ThrowIfTypeDoesNotImplementToString(input); 1107ErrorUtilities.ThrowIfTypeDoesNotImplementToString(output); 1199ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(path1) && !string.IsNullOrEmpty(path2),
BackEnd\Components\RequestBuilder\TaskBuilder.cs (10)
154ErrorUtilities.VerifyThrow(taskInstance != null, "Need to specify the task instance."); 211ErrorUtilities.VerifyThrow(_taskExecutionHost != null, "taskExecutionHost not initialized."); 228ErrorUtilities.VerifyThrow(type == BuildComponentType.TaskBuilder, "Cannot create components of type {0}", type); 296ErrorUtilities.VerifyThrowArgumentNull(lookup); 492ErrorUtilities.VerifyThrow(howToExecuteTask == TaskExecutionMode.InferOutputsOnly, "should be inferring"); 494ErrorUtilities.VerifyThrow( 522ErrorUtilities.VerifyThrowInternalNull(_taskNode, "taskNode"); // taskNode should never be null when we're calling this method. 663ErrorUtilities.VerifyThrow(executionResult != null, "Unexpected null execution result"); 939ErrorUtilities.ThrowInternalErrorUnreachable(); 1148ErrorUtilities.VerifyThrow(howToExecuteTask == TaskExecutionMode.InferOutputsOnly, "should be inferring");
BackEnd\Components\RequestBuilder\TaskHost.cs (22)
117ErrorUtilities.VerifyThrowArgumentNull(host); 118ErrorUtilities.VerifyThrowArgumentNull(requestEntry); 119ErrorUtilities.VerifyThrowInternalNull(taskLocation); 291ErrorUtilities.VerifyThrowArgument((targetOutputsPerProject == null) || (projectFileNames.Length == targetOutputsPerProject.Length), "General.TwoVectorsMustHaveSameLength", projectFileNames.Length, targetOutputsPerProject?.Length ?? 0, "projectFileNames", "targetOutputsPerProject"); 299ErrorUtilities.VerifyThrow(targetOutputsPerProject.Length == result.TargetOutputsPerProject.Count, "{0} != {1}", targetOutputsPerProject.Length, result.TargetOutputsPerProject.Count); 359ErrorUtilities.VerifyThrow(_yieldThreadId == -1, "Cannot call Yield() while yielding."); 388ErrorUtilities.VerifyThrow(_yieldThreadId != -1, "Cannot call Reacquire() before Yield()."); 389ErrorUtilities.VerifyThrow(_yieldThreadId == Thread.CurrentThread.ManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Thread.CurrentThread.ManagedThreadId, _yieldThreadId); 411ErrorUtilities.VerifyThrowArgumentNull(e); 481ErrorUtilities.VerifyThrowArgumentNull(e); 522ErrorUtilities.VerifyThrowArgumentNull(e); 563ErrorUtilities.VerifyThrowArgumentNull(e); 654ErrorUtilities.VerifyThrowArgumentNull(eventName); 813ErrorUtilities.VerifyThrowArgumentOutOfRange(requestedCores > 0, nameof(requestedCores)); 860ErrorUtilities.VerifyThrowArgumentOutOfRange(coresToRelease > 0, nameof(coresToRelease)); 968ErrorUtilities.VerifyThrowArgumentNull(projectFileNames); 969ErrorUtilities.VerifyThrowArgumentNull(globalProperties); 1141ErrorUtilities.VerifyThrowArgumentNull(projectFileNames); 1142ErrorUtilities.VerifyThrowArgumentNull(globalProperties); 1214ErrorUtilities.VerifyThrow(results.Length == projectFileNames.Length, "{0}!={1}.", results.Length, projectFileNames.Length); 1259ErrorUtilities.VerifyThrow(results.Length == projectFileNames.Length || !overallSuccess, "The number of results returned {0} cannot be less than the number of project files {1} unless one of the results indicated failure.", results.Length, projectFileNames.Length); 1274ErrorUtilities.VerifyThrow(_activeProxy, "Attempted to use an inactive task host.");
BackEnd\Components\Scheduler\SchedulableRequest.cs (26)
129ErrorUtilities.VerifyThrowArgumentNull(collection); 130ErrorUtilities.VerifyThrowArgumentNull(request); 131ErrorUtilities.VerifyThrow((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection."); 256ErrorUtilities.VerifyThrow(_creationTime == DateTime.MinValue, "Cannot set CreationTime twice."); 273ErrorUtilities.VerifyThrow(_startTime == DateTime.MinValue, "Cannot set StartTime twice."); 290ErrorUtilities.VerifyThrow(_endTime == DateTime.MinValue, "Cannot set EndTime twice."); 314ErrorUtilities.VerifyThrowArgumentNull(activeTargets); 338ErrorUtilities.VerifyThrowArgumentNull(blockingRequest); 339ErrorUtilities.VerifyThrowArgumentNull(activeTargets); 340ErrorUtilities.VerifyThrow(BlockingTarget == null, "Cannot block again if we're already blocked on a target"); 345ErrorUtilities.VerifyThrow(!_requestsWeAreBlockedBy.ContainsKey(key), "We are already blocked by this request."); 346ErrorUtilities.VerifyThrow(!blockingRequest._requestsWeAreBlocking.Contains(this), "The blocking request thinks it is already blocking us."); 375ErrorUtilities.VerifyThrowArgumentNull(result); 388ErrorUtilities.VerifyThrowArgumentNull(result); 401ErrorUtilities.VerifyThrow(_assignedNodeId == Scheduler.InvalidNodeId || _assignedNodeId == nodeId, "Request must always resume on the same node on which it was started."); 404ErrorUtilities.VerifyThrow((_state == SchedulableRequestState.Ready) || !_schedulingData.IsRequestScheduled(this), "Another instance of request {0} is already scheduled.", _request.GlobalRequestId); 405ErrorUtilities.VerifyThrow(!_schedulingData.IsNodeWorking(nodeId), "Cannot resume execution of request {0} because node {1} is already working.", _request.GlobalRequestId, nodeId); 408ErrorUtilities.VerifyThrow(requiredNodeId == Scheduler.InvalidNodeId || requiredNodeId == nodeId, "Request {0} cannot be assigned to node {1} because its configuration is already assigned to node {2}", _request.GlobalRequestId, nodeId, requiredNodeId); 420ErrorUtilities.VerifyThrow(_state != SchedulableRequestState.Ready || result.CircularDependency, "Request can only be Completed from the Ready state if the result indicates a circular dependency occurred."); 421ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.Count == 0, "We can't be complete if we are still blocked on requests."); 439ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.Count == 0, "We are blocked by requests."); 440ErrorUtilities.VerifyThrow(_requestsWeAreBlocking.Count == 0, "We are blocking by requests."); 449ErrorUtilities.VerifyThrow(_state == requiredState, "Request {0} expected to be in state {1} but state is actually {2}", _request.GlobalRequestId, requiredState, _state); 465ErrorUtilities.ThrowInternalError("State {0} is not one of the expected states.", _state); 641ErrorUtilities.VerifyThrow(_requestsWeAreBlockedBy.TryGetValue(blockingRequestKey, out SchedulableRequest unblockingRequest), "We are not blocked by the specified request."); 642ErrorUtilities.VerifyThrow(unblockingRequest._requestsWeAreBlocking.Contains(this), "The request unblocking us doesn't think it is blocking us.");
BackEnd\Components\Scheduler\Scheduler.cs (30)
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."); 506ErrorUtilities.ThrowInternalErrorUnreachable(); 651ErrorUtilities.VerifyThrow(componentType == BuildComponentType.Scheduler, "Cannot create components of type {0}", componentType); 758ErrorUtilities.ThrowInternalError("Somehow no requests are currently executing, and at least one of the {0} requests blocked by in-progress requests is servicable by a currently existing node, but no circular dependency was detected ...", _schedulingData.BlockedRequestsCount); 765ErrorUtilities.ThrowInternalError("None of the {0} blocked requests can be serviced by currently existing nodes, but we aren't requesting a new one.", _schedulingData.BlockedRequestsCount); 771ErrorUtilities.ThrowInternalError("Somehow we have {0} requests which are ready to go but we didn't tell the nodes to continue.", _schedulingData.ReadyRequestsCount); 776ErrorUtilities.ThrowInternalError("Somehow we have {0} unassigned build requests but {1} of our nodes are free and we aren't requesting a new one...", _schedulingData.UnscheduledRequestsCount, idleNodes.Count); 781ErrorUtilities.VerifyThrow(responses.Count > 0, "We failed to request a node to be created."); 1357ErrorUtilities.VerifyThrowArgumentNull(request); 1358ErrorUtilities.VerifyThrowArgumentNull(responses); 1359ErrorUtilities.VerifyThrow(nodeId != InvalidNodeId, "Invalid node id specified."); 1374ErrorUtilities.VerifyThrow(config.ResultsNodeId != InvalidNodeId, "Configuration's results node is not set."); 1387ErrorUtilities.VerifyThrow( 1538ErrorUtilities.ThrowInternalErrorUnreachable(); 1558ErrorUtilities.VerifyThrow(inProcNodesToCreate == 1, "We should never be trying to create more than one inproc node"); 1622ErrorUtilities.VerifyThrowArgumentNull(blockedRequest); 1623ErrorUtilities.VerifyThrowArgumentNull(blocker); 1681ErrorUtilities.VerifyThrowArgumentNull(blocker); 1682ErrorUtilities.VerifyThrowArgumentNull(responses); 1763ErrorUtilities.VerifyThrowInternalError( 1852ErrorUtilities.VerifyThrow(request.Parent == null, "Unexpectedly generated a SubmissionComplete response for a request which is not top-level."); 2036ErrorUtilities.VerifyThrowInternalNull(parentRequest); 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 (15)
293ErrorUtilities.VerifyThrow(_buildHierarchy.ContainsKey(parent), "Parent doesn't exist in build hierarchy for request {0}", request.BuildRequest.GlobalRequestId); 317ErrorUtilities.ThrowInternalError("Should not be updating a request after it has reached the Completed state."); 345ErrorUtilities.VerifyThrow(!requestsAssignedToNode.Contains(request), "Request {0} is already scheduled to node {1}", request.BuildRequest.GlobalRequestId, request.AssignedNode); 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!"); 379ErrorUtilities.VerifyThrow(_configurationToRequests.ContainsKey(request.BuildRequest.ConfigurationId), "Configuration {0} never had requests assigned to it.", request.BuildRequest.ConfigurationId); 380ErrorUtilities.VerifyThrow(_configurationToRequests[request.BuildRequest.ConfigurationId].Count > 0, "Configuration {0} has no requests assigned to it.", request.BuildRequest.ConfigurationId); 391ErrorUtilities.VerifyThrow(!_executingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already executing!"); 392ErrorUtilities.VerifyThrow(!_executingRequestByNode.ContainsKey(request.AssignedNode) || _executingRequestByNode[request.AssignedNode] == null, "Node {0} is currently executing a request.", request.AssignedNode); 405ErrorUtilities.VerifyThrow(!_readyRequests.ContainsKey(request.BuildRequest.GlobalRequestId), "Request with global id {0} is already ready!"); 414ErrorUtilities.VerifyThrow(!readyRequestsOnNode.Contains(request), "Request with global id {0} is already marked as ready on node {1}", request.BuildRequest.GlobalRequestId, request.AssignedNode); 419ErrorUtilities.ThrowInternalError("Request with global id {0} cannot transition to the Unscheduled state", request.BuildRequest.GlobalRequestId); 504ErrorUtilities.VerifyThrow(returnValue != null, "Global Request Id {0} has not been assigned and cannot be retrieved.", globalRequestId); 695ErrorUtilities.VerifyThrow( 740ErrorUtilities.ThrowInternalError("Request {0} was expected to be in state {1} but is not scheduled at all (it may be unscheduled or may be unknown to the system.)", globalRequestId, state);
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (5)
36ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.SdkResolverService, nameof(type)); 101ErrorUtilities.VerifyThrowInternalNull(sdk); 102ErrorUtilities.VerifyThrowInternalNull(loggingContext); 103ErrorUtilities.VerifyThrowInternalNull(sdkReferenceLocation); 104ErrorUtilities.VerifyThrowInternalLength(projectPath, nameof(projectPath));
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (1)
50ErrorUtilities.VerifyThrowArgumentNull(sendPacket);
BackEnd\Components\SdkResolution\SdkResolverManifest.cs (1)
132ErrorUtilities.ThrowInternalError("A regular expression parsing error occurred while parsing {0}.", ex, filePath);
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
190ErrorUtilities.ThrowInternalError("Timeout exceeded matching sdk \"{0}\" to <ResolvableSdkPattern> from sdk resolver manifest {1}.", ex, sdk.Name, manifest.DisplayName);
BackEnd\Node\InProcNode.cs (2)
189ErrorUtilities.ThrowInternalError(e.Message, e); 222ErrorUtilities.ThrowInternalError("Unexpected call to DeserializeAndRoutePacket on the in-proc node.");
BackEnd\Node\ServerNodeBuildCommand.cs (1)
93ErrorUtilities.VerifyThrowInternalNull(consoleConfiguration);
BackEnd\Shared\BuildRequest.cs (6)
187ErrorUtilities.VerifyThrowArgumentNull(escapedTargets, "targets"); 188ErrorUtilities.VerifyThrowArgumentNull(parentBuildEventContext); 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 (25)
170ErrorUtilities.VerifyThrowArgumentNull(data); 171ErrorUtilities.VerifyThrowInternalLength(data.ProjectFullPath, "data.ProjectFullPath"); 212ErrorUtilities.VerifyThrowArgumentNull(instance); 232ErrorUtilities.VerifyThrow(configId != InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor."); 233ErrorUtilities.VerifyThrowArgumentNull(other); 234ErrorUtilities.VerifyThrow(other._transferredState == null, "Unexpected transferred state still set on other configuration."); 344ErrorUtilities.VerifyThrow((_configId == InvalidConfigurationId) || (WasGeneratedByNode && (value > InvalidConfigurationId)), "Configuration ID must be invalid, or it must be less than invalid and the new config must be greater than invalid. It was {0}, the new value was {1}.", _configId, value); 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."); 436ErrorUtilities.VerifyThrow(!IsLoaded, "Already loaded the project for this configuration id {0}.", ConfigurationId); 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."); 713ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e); 752ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e); 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( 811ErrorUtilities.VerifyThrowInternalNull(Project); 812ErrorUtilities.VerifyThrowInternalLength(referenceFullPath, nameof(referenceFullPath)); 813ErrorUtilities.VerifyThrow(Path.IsPathRooted(referenceFullPath), "Method does not treat path normalization cases");
BackEnd\Shared\BuildRequestUnblocker.cs (3)
46ErrorUtilities.VerifyThrowArgumentOutOfRange(globalRequestIdToResume != BuildRequest.InvalidGlobalRequestId, nameof(globalRequestIdToResume)); 55ErrorUtilities.VerifyThrowArgumentNull(buildResult); 66ErrorUtilities.VerifyThrowArgumentNull(parentRequest);
BackEnd\Shared\BuildResult.cs (6)
526ErrorUtilities.VerifyThrowArgumentNull(target); 527ErrorUtilities.VerifyThrowArgumentNull(result); 536ErrorUtilities.VerifyThrow(targetResult.ResultCode == TargetResultCode.Skipped, "Items already exist for target {0}.", target); 548ErrorUtilities.VerifyThrow( 567ErrorUtilities.VerifyThrowArgumentNull(results); 568ErrorUtilities.VerifyThrow(results.ConfigurationId == ConfigurationId, "Result configurations don't match");
BackEnd\Shared\ConfigurationMetadata.cs (4)
27ErrorUtilities.VerifyThrowArgumentNull(configuration); 38ErrorUtilities.VerifyThrowArgumentNull(project); 54ErrorUtilities.VerifyThrowArgumentLength(projectFullPath); 55ErrorUtilities.VerifyThrowArgumentNull(globalProperties);
BackEnd\Shared\EventsCreatorHelper.cs (8)
18ErrorUtilities.VerifyThrowInternalNull(buildEventContext); 19ErrorUtilities.VerifyThrowInternalNull(message); 35ErrorUtilities.VerifyThrowInternalNull(buildEventContext); 36ErrorUtilities.VerifyThrowInternalNull(file); 37ErrorUtilities.VerifyThrowInternalNull(message); 66ErrorUtilities.VerifyThrowInternalNull(buildEventContext); 67ErrorUtilities.VerifyThrowInternalNull(file); 68ErrorUtilities.VerifyThrowInternalNull(message);
BackEnd\Shared\TargetResult.cs (3)
68ErrorUtilities.VerifyThrowArgumentNull(items); 69ErrorUtilities.VerifyThrowArgumentNull(result); 337ErrorUtilities.VerifyThrow(buffer != null, "Unexpected null items buffer during translation.");
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (7)
302ErrorUtilities.VerifyThrowArgumentNull(loggingContext); 303ErrorUtilities.VerifyThrowArgumentNull(batchBucket); 355ErrorUtilities.VerifyThrowArgumentNull(parameters); 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 (2)
36ErrorUtilities.VerifyThrow(type == BuildComponentType.BuildCheckManagerProvider, "Cannot create components of type {0}", type); 42ErrorUtilities.VerifyThrow(host != null, "BuildComponentHost was null");
BuildCheck\Infrastructure\CheckContext\CheckDispatchingContext.cs (2)
37ErrorUtilities.VerifyThrowInternalNull(buildEvent); 44ErrorUtilities.VerifyThrowInternalLength(messageResourceName, nameof(messageResourceName));
BuildEventFileInfo.cs (2)
87ErrorUtilities.VerifyThrow(e != null, "Need exception context."); 100ErrorUtilities.VerifyThrowArgumentNull(file);
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\CopyOnReadEnumerable.cs (2)
47ErrorUtilities.VerifyThrowArgumentNull(backingEnumerable); 48ErrorUtilities.VerifyThrowArgumentNull(syncRoot);
Collections\CopyOnWritePropertyDictionary.cs (8)
106ErrorUtilities.VerifyThrowInternalNull(value, "Properties can't have null value"); 107ErrorUtilities.VerifyThrow(String.Equals(name, value.Key, StringComparison.OrdinalIgnoreCase), "Key must match value's key"); 250ErrorUtilities.VerifyThrowInternalNull(value, "Properties can't have null value"); 251ErrorUtilities.VerifyThrow(key == value.Key, "Key must match value's key"); 295ErrorUtilities.ThrowInternalError("CopyTo is not supported on PropertyDictionary."); 303ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key"); 327ErrorUtilities.VerifyThrowArgumentLength(name); 339ErrorUtilities.VerifyThrowArgumentNull(projectProperty);
Collections\ItemDictionary.cs (3)
299ErrorUtilities.VerifyThrow(existingItem.Key == newItem.Key, "Cannot replace an item {0} with an item {1} with a different name.", existingItem.Key, newItem.Key); 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 (8)
113ErrorUtilities.ThrowInternalError("Keys is not supported on PropertyDictionary."); 202ErrorUtilities.VerifyThrowInternalNull(value, "Properties can't have null value"); 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"); 429ErrorUtilities.ThrowInternalError("CopyTo is not supported on PropertyDictionary."); 437ErrorUtilities.VerifyThrow(item.Key == item.Value.Key, "Key must match value's key"); 463ErrorUtilities.VerifyThrowArgumentLength(name); 479ErrorUtilities.VerifyThrowArgumentNull(projectProperty);
Collections\ReadOnlyConvertingDictionary.cs (11)
37ErrorUtilities.VerifyThrowArgumentNull(backing); 38ErrorUtilities.VerifyThrowArgumentNull(converter); 58ErrorUtilities.ThrowInternalError("Values is not supported on ReadOnlyConvertingDictionary."); 81set => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 89ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 105ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 133ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 141ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 149ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedConvertingCollectionValueToBacking"); 158ErrorUtilities.VerifyThrow(array.Length - arrayIndex >= _backing.Count, "Specified array size insufficient to hold the contents of the collection."); 171ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (4)
123ErrorUtilities.ThrowInternalError("use explicit comparer"); 261ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 414ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 816ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
Collections\WeakValueDictionary.cs (1)
105ErrorUtilities.ThrowInternalErrorUnreachable();
CommunicationsUtilities.cs (6)
291ErrorUtilities.VerifyThrowInternalNull(DebugUtils.ProcessInfoString, nameof(DebugUtils.DebugPath)); 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."); 641ErrorUtilities.ThrowInternalErrorUnreachable(); 675ErrorUtilities.ThrowInternalErrorUnreachable();
Construction\ProjectChooseElement.cs (5)
35ErrorUtilities.VerifyThrowArgumentNull(parent); 53set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 84ErrorUtilities.ThrowInternalError("Should not evaluate this"); 95ErrorUtilities.VerifyThrow(containingProject.Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 107ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectElement.cs (11)
52ErrorUtilities.VerifyThrowArgumentNull(link); 63ErrorUtilities.VerifyThrowArgumentNull(xmlElement); 64ErrorUtilities.VerifyThrowArgumentNull(containingProject); 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."); 265ErrorUtilities.VerifyThrowArgumentNull(value, "ContainingProject"); 353ErrorUtilities.VerifyThrowArgumentNull(element); 354ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 509ErrorUtilities.ThrowInternalError("{0}.Clone() returned an instance of type {1}.", GetType().Name, clone.GetType().Name); 620ErrorUtilities.VerifyThrowInternalNull(containingProject); 634ErrorUtilities.ThrowInternalErrorUnreachable();
Construction\ProjectElementContainer.cs (31)
145ErrorUtilities.VerifyThrowArgumentNull(child); 176ErrorUtilities.VerifyThrow(child.NextSibling.PreviousSibling == reference, "Invalid structure"); 200ErrorUtilities.VerifyThrowArgumentNull(child); 232ErrorUtilities.VerifyThrow(child.PreviousSibling.NextSibling == reference, "Invalid structure"); 256ErrorUtilities.VerifyThrow(FirstChild != null, "Invalid structure"); 275ErrorUtilities.VerifyThrow(LastChild != null, "Invalid structure"); 295ErrorUtilities.VerifyThrowArgumentNull(child); 297ErrorUtilities.VerifyThrowArgument(child.Parent == this, "OM_NodeNotAlreadyParentedByThis"); 354ErrorUtilities.VerifyThrowArgumentNull(element); 355ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 389ErrorUtilities.VerifyThrow(child.Parent == this, "Expected parent already set"); 390ErrorUtilities.VerifyThrow(child.PreviousSibling == null && child.NextSibling == null, "Invalid structure"); 391ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 441ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 458ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 474ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 494ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 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"); 675ErrorUtilities.VerifyThrowInvalidOperation(Parent != null || ContainingProject == this, "OM_ParentNotParented"); 676ErrorUtilities.VerifyThrowInvalidOperation(reference == null || reference.Parent == this, "OM_ReferenceDoesNotHaveThisParent"); 677ErrorUtilities.VerifyThrowInvalidOperation(child.Parent == null, "OM_NodeAlreadyParented"); 678ErrorUtilities.VerifyThrowInvalidOperation(child.ContainingProject == ContainingProject, "OM_MustBeSameProject"); 683ErrorUtilities.VerifyThrow(child.NextSibling == null || child.NextSibling.PreviousSibling != this, "Invalid structure"); 684ErrorUtilities.VerifyThrow(child.PreviousSibling == null || child.PreviousSibling.NextSibling != this, "Invalid structure"); 698ErrorUtilities.VerifyThrowInvalidOperation(ancestor != element, "OM_SelfAncestor"); 830public void Add(T item) => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 832public void Clear() => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 838ErrorUtilities.VerifyThrowArgumentNull(array); 857ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 867ErrorUtilities.VerifyThrowArgumentNull(array);
Construction\ProjectExtensionsElement.cs (10)
38ErrorUtilities.VerifyThrowArgumentNull(parent); 56set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 72ErrorUtilities.VerifyThrowArgumentNull(value, nameof(Content)); 91ErrorUtilities.ThrowInternalError("Should not evaluate this"); 104ErrorUtilities.VerifyThrowArgumentLength(name); 119ErrorUtilities.VerifyThrowArgumentLength(name); 120ErrorUtilities.VerifyThrowArgumentNull(value, "value"); 164ErrorUtilities.VerifyThrowArgumentNull(element); 165ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 205ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectImportElement.cs (4)
38ErrorUtilities.VerifyThrowArgumentNull(parent); 58ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.project); 77ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.sdk); 178ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectImportGroupElement, "OM_CannotAcceptParent");
Construction\ProjectImportGroupElement.cs (3)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 64ErrorUtilities.VerifyThrowArgumentLength(project); 89ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectItemDefinitionElement.cs (4)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 75ErrorUtilities.VerifyThrowArgumentLength(name); 76ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue); 115ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectItemDefinitionGroupElement, "OM_CannotAcceptParent");
Construction\ProjectItemDefinitionGroupElement.cs (2)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 80ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectItemElement.cs (21)
68ErrorUtilities.VerifyThrowArgumentNull(parent); 105ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update); 127ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Remove.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.remove); 128ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Update.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.update); 149ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Include.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update); 168ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Include.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update); 189ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement || Parent.Parent is ProjectRootElement, "OM_NoMatchOnMetadataOutsideTargets"); 191ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length != 0, "OM_MatchOnMetadataOnlyApplicableToRemoveItems", ElementName, XMakeAttributes.matchOnMetadata); 211ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || MatchOnMetadata.Length != 0, "OM_MatchOnMetadataOptionsOnlyApplicableToItemsWithMatchOnMetadata", ElementName, XMakeAttributes.matchOnMetadataOptions); 231ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepMetadataOutsideTargets"); 232ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.removeMetadata, XMakeAttributes.keepMetadata); 252ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoRemoveMetadataOutsideTargets"); 253ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || KeepMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.keepMetadata, XMakeAttributes.removeMetadata); 273ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepDuplicatesOutsideTargets"); 392ErrorUtilities.VerifyThrowArgumentLength(name); 393ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue); 425ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemType), "CannotModifyReservedItem", itemType); 442ErrorUtilities.VerifyThrowArgumentLength(newItemType); 444ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newItemType), "CannotModifyReservedItem", newItemType); 475ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectTargetElement || (Include.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove"); 476ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectRootElement || parent.Parent is ProjectTargetElement || parent.Parent is ProjectWhenElement || parent.Parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectItemGroupElement.cs (4)
42ErrorUtilities.VerifyThrowArgumentNull(parent); 102ErrorUtilities.VerifyThrowArgumentLength(itemType); 103ErrorUtilities.VerifyThrowArgumentLength(include); 177ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectMetadataElement.cs (7)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 92ErrorUtilities.VerifyThrowArgumentNull(value); 106ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 107ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name); 122ErrorUtilities.VerifyThrowArgumentLength(newName); 124ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newName), "CannotModifyReservedItemMetadata", newName); 168ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectItemElement || parent is ProjectItemDefinitionElement, "OM_CannotAcceptParent");
Construction\ProjectOnErrorElement.cs (3)
32ErrorUtilities.VerifyThrowArgumentNull(parent); 59ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.executeTargets); 89ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectTargetElement, "OM_CannotAcceptParent");
Construction\ProjectOtherwiseElement.cs (5)
33ErrorUtilities.VerifyThrowArgumentNull(parent); 51set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 79ErrorUtilities.ThrowInternalError("Should not evaluate this"); 101ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectChooseElement, "OM_CannotAcceptParent"); 102ErrorUtilities.VerifyThrowInvalidOperation(!(nextSibling is ProjectWhenElement) && !(previousSibling is ProjectOtherwiseElement) && !(nextSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\ProjectOutputElement.cs (6)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 60ErrorUtilities.VerifyThrowArgumentLength(value); 93ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(PropertyName), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.itemName, XMakeAttributes.propertyName); 113ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(ItemType), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.itemName, XMakeAttributes.propertyName); 141ErrorUtilities.VerifyThrowArgument( 170ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectTaskElement, "OM_CannotAcceptParent");
Construction\ProjectPropertyElement.cs (6)
42ErrorUtilities.VerifyThrowArgumentNull(parent); 72ErrorUtilities.VerifyThrowArgumentNull(value); 97ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name) && !ReservedPropertyNames.IsReservedProperty(name), "OM_CannotCreateReservedProperty", name); 112ErrorUtilities.VerifyThrowArgumentLength(newName); 114ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newName), "CannotModifyReservedProperty", newName); 134ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectPropertyGroupElement, "OM_CannotAcceptParent");
Construction\ProjectPropertyGroupElement.cs (6)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 61ErrorUtilities.VerifyThrowArgumentLength(name); 62ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue); 78ErrorUtilities.VerifyThrowArgumentLength(name); 79ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue); 110ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectRootElement.cs (37)
166ErrorUtilities.VerifyThrowArgumentNull(xmlReader); 167ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache); 185ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache); 217ErrorUtilities.VerifyThrowArgumentLength(path); 218ErrorUtilities.VerifyThrowInternalRooted(path); 219ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache); 241ErrorUtilities.VerifyThrowArgumentNull(document); 242ErrorUtilities.VerifyThrowArgumentNull(projectRootElementCache); 280set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 400ErrorUtilities.VerifyThrowArgumentLength(value); 632ErrorUtilities.ThrowInternalError("Should not evaluate this"); 747ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 785ErrorUtilities.VerifyThrowArgumentLength(path); 786ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 823ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 856ErrorUtilities.VerifyThrowArgumentLength(path); 857ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 876ErrorUtilities.VerifyThrowArgumentLength(path); 913ErrorUtilities.VerifyThrowArgumentLength(path); 914ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 930ErrorUtilities.VerifyThrowArgumentLength(project); 987ErrorUtilities.VerifyThrowArgumentLength(itemType); 988ErrorUtilities.VerifyThrowArgumentLength(include); 1064ErrorUtilities.VerifyThrowArgumentLength(itemType); 1516ErrorUtilities.VerifyThrowInvalidOperation(_projectFileLocation != null, "OM_MustSetFileNameBeforeSave"); 1624ErrorUtilities.VerifyThrowInvalidOperation(!string.IsNullOrEmpty(FullPath), "ValueNotSet", $"{nameof(ProjectRootElement)}.{nameof(FullPath)}"); 1637ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path); 1735ErrorUtilities.VerifyThrowInternalRooted(path); 1755ErrorUtilities.VerifyThrow(document.FullPath == null, "Only virtual documents supported"); 1767ErrorUtilities.VerifyThrowInternalRooted(fullPath); 1794ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 1804ErrorUtilities.ThrowInvalidOperation("OM_CannotAcceptParent"); 1850ErrorUtilities.VerifyThrowArgumentNull(project); 1851ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 2020ErrorUtilities.VerifyThrowInternalRooted(projectFile); 2055ErrorUtilities.VerifyThrowInternalRooted(fullPath); 2136ErrorUtilities.ThrowInvalidOperation("NoReloadOnUnsavedChanges", null);
Construction\ProjectSdkElement.cs (3)
31ErrorUtilities.VerifyThrowArgumentNull(parent); 49ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.sdkName); 82ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectTargetElement.cs (11)
44ErrorUtilities.VerifyThrowArgumentNull(parent); 100ErrorUtilities.VerifyThrowArgumentLength(value); 112ErrorUtilities.ThrowArgument("OM_NameInvalid", unescapedValue, unescapedValue[indexOfSpecialCharacter]); 135ErrorUtilities.VerifyThrowArgumentNull(value, XMakeAttributes.inputs); 155ErrorUtilities.VerifyThrowArgumentNull(value, XMakeAttributes.outputs); 183ErrorUtilities.VerifyThrowArgumentNull(value, XMakeAttributes.keepDuplicateOutputs); 203ErrorUtilities.VerifyThrowArgumentNull(value, XMakeAttributes.dependsOnTargets); 223ErrorUtilities.VerifyThrowArgumentNull(value, XMakeAttributes.beforeTargets); 243ErrorUtilities.VerifyThrowArgumentNull(value, XMakeAttributes.afterTargets); 381ErrorUtilities.VerifyThrowArgumentLength(taskName); 417ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectTaskElement.cs (12)
49ErrorUtilities.VerifyThrowArgumentNull(parent); 215ErrorUtilities.VerifyThrow(Link == null, "Attempt to edit a document that is not backed by a local xml is disallowed."); 232ErrorUtilities.VerifyThrowArgumentLength(taskParameter); 233ErrorUtilities.VerifyThrowArgumentLength(itemType); 262ErrorUtilities.VerifyThrowArgumentLength(taskParameter); 263ErrorUtilities.VerifyThrowArgumentLength(propertyName); 299ErrorUtilities.VerifyThrowArgumentLength(name); 325ErrorUtilities.VerifyThrowArgumentLength(name); 326ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue); 327ErrorUtilities.VerifyThrowArgument(!XMakeAttributes.IsSpecialTaskAttribute(name), "CannotAccessKnownAttributes", name); 414ErrorUtilities.VerifyThrowArgumentLength(name); 427ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectTargetElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskBodyElement.cs (6)
36ErrorUtilities.VerifyThrowArgumentNull(parent); 55set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 74ErrorUtilities.VerifyThrowArgumentNull(value, nameof(TaskBody)); 111ErrorUtilities.ThrowInternalError("Should not evaluate this"); 160ErrorUtilities.VerifyThrowInvalidOperation(parentUsingTask != null, "OM_CannotAcceptParent"); 166ErrorUtilities.VerifyThrow(parentUsingTask.Link == null, "TaskFactory");
Construction\ProjectUsingTaskElement.cs (8)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 56ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.assemblyName); 57ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyName), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName); 73ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.assemblyName); 74ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyFile), "OM_EitherAttributeButNotBoth", XMakeElements.usingTask, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName); 88ErrorUtilities.VerifyThrowArgumentLength(value, XMakeAttributes.taskName); 234ErrorUtilities.VerifyThrowArgument( 268ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskParameterElement.cs (5)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 52set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 64ErrorUtilities.VerifyThrowArgumentLength(value, nameof(Name)); 142ErrorUtilities.ThrowInternalError("Should not evaluate this"); 193ErrorUtilities.VerifyThrowInvalidOperation(parent is UsingTaskParameterGroupElement, "OM_CannotAcceptParent");
Construction\ProjectWhenElement.cs (3)
34ErrorUtilities.VerifyThrowArgumentNull(parent); 82ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectChooseElement, "OM_CannotAcceptParent"); 83ErrorUtilities.VerifyThrowInvalidOperation(!(previousSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\Solution\ProjectInSolution.cs (3)
18using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 488ErrorUtilities.VerifyThrowArgumentLength(newUniqueName); 500ErrorUtilities.VerifyThrow(projectName != null, "Null strings not allowed.");
Construction\Solution\SolutionFile.cs (14)
24using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 229ErrorUtilities.VerifyThrowInternalRooted(value); 336ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(_solutionFile), "ReadSolutionModel() got a null or empty solution file."); 337ErrorUtilities.VerifyThrowInternalRooted(_solutionFile); 523ErrorUtilities.VerifyThrow(!String.IsNullOrEmpty(solutionFile), "null solution file passed to GetSolutionFileMajorVersion!"); 524ErrorUtilities.VerifyThrowInternalRooted(solutionFile); 688ErrorUtilities.VerifyThrow(SolutionReader != null, "ParseFileHeader(): reader is null!"); 714ErrorUtilities.VerifyThrow(!string.IsNullOrEmpty(_solutionFile), "ParseSolutionFile() got a null solution file!"); 715ErrorUtilities.VerifyThrowInternalRooted(_solutionFile); 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 (6)
35ErrorUtilities.VerifyThrowArgumentNull(parent); 54set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 69ErrorUtilities.ThrowInternalError("Should not evaluate this"); 80ErrorUtilities.VerifyThrowArgumentLength(name); 129ErrorUtilities.VerifyThrowInvalidOperation(parentUsingTask != null, "OM_CannotAcceptParent"); 135ErrorUtilities.VerifyThrow(parentUsingTask.Link == null, "TaskFactory");
ConversionUtilities.cs (3)
7using Error = Microsoft.Build.Shared.ErrorUtilities; 38Error.ThrowArgument("Shared.CannotConvertStringToBool", parameterValue); 147Error.ThrowInternalError("Cannot numeric evaluate");
Definition\Project.cs (64)
111ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 112ErrorUtilities.VerifyThrowArgumentNull(link); 267ErrorUtilities.VerifyThrowArgumentNull(xml); 268ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 269ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 361ErrorUtilities.VerifyThrowArgumentNull(xmlReader); 362ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 363ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 457ErrorUtilities.VerifyThrowArgumentNull(projectFile); 458ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 459ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 853ErrorUtilities.VerifyThrowArgumentNull(item); 863ErrorUtilities.VerifyThrowArgumentNull(item); 1080ErrorUtilities.VerifyThrowArgumentNull(metadatum); 1091ErrorUtilities.VerifyThrowArgumentNull(item); 1101ErrorUtilities.VerifyThrowArgumentNull(item); 1112ErrorUtilities.VerifyThrowArgumentNull(property); 1677ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}"); 1797ErrorUtilities.VerifyThrow(!implementationInternal.IsZombified, "OM_ProjectIsNoLongerActive"); 1808ErrorUtilities.VerifyThrowInternalNull(otherXml); 1809ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File); 1882ErrorUtilities.VerifyThrowArgumentNull(xml); 1883ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 1884ErrorUtilities.VerifyThrowArgumentNull(owner); 1906ErrorUtilities.VerifyThrowArgumentNull(xmlReader); 1907ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 1908ErrorUtilities.VerifyThrowArgumentNull(owner); 1941ErrorUtilities.VerifyThrowArgumentNull(projectFile); 1942ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 1943ErrorUtilities.VerifyThrowArgumentNull(owner); 2235ErrorUtilities.ThrowInvalidOperation("OM_NotEvaluatedBecauseShouldEvaluateForDesignTimeIsFalse", nameof(ItemsIgnoringCondition)); 2277ErrorUtilities.VerifyThrowInvalidOperation((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0, "OM_MustSetRecordDuplicateInputs"); 2456ErrorUtilities.ThrowInternalErrorUnreachable(); 2840ErrorUtilities.ThrowInternalErrorUnreachable(); 2927ErrorUtilities.VerifyThrowArgumentLength(name); 2928ErrorUtilities.VerifyThrowArgumentNull(unevaluatedValue); 2932ErrorUtilities.VerifyThrowInvalidOperation(property?.IsReservedProperty != true, "OM_ReservedName", name); 2933ErrorUtilities.VerifyThrowInvalidOperation(property?.IsGlobalProperty != true, "OM_GlobalProperty", name); 3055ErrorUtilities.VerifyThrowArgumentLength(itemType); 3056ErrorUtilities.VerifyThrowArgumentLength(unevaluatedInclude); 3155ErrorUtilities.VerifyThrowArgumentNull(property); 3156ErrorUtilities.VerifyThrowInvalidOperation(!property.IsReservedProperty, "OM_ReservedName", property.Name); 3157ErrorUtilities.VerifyThrowInvalidOperation(!property.IsGlobalProperty, "OM_GlobalProperty", property.Name); 3158ErrorUtilities.VerifyThrowArgument(property.Xml.Parent != null, "OM_IncorrectObjectAssociation", "ProjectProperty", "Project"); 3182ErrorUtilities.VerifyThrowArgumentLength(name); 3217ErrorUtilities.VerifyThrowArgumentNull(item); 3218ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project"); 3237ErrorUtilities.VerifyThrowArgumentNull(items); 3260ErrorUtilities.VerifyThrowArgumentNull(unexpandedValue); 3398ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}"); 3557ErrorUtilities.VerifyThrow(_data.Expander.Metadata == null, "Should be null"); 3584ErrorUtilities.VerifyThrowInternalNull(otherXml); 3585ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File); 3636ErrorUtilities.VerifyThrowArgumentNull(item); 3645ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project"); 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"); 4388ErrorUtilities.VerifyThrowInternalNull(property); 4400ErrorUtilities.VerifyThrowInternalNull(itemDefinitionMetadatum); 4412ErrorUtilities.VerifyThrowInternalNull(item); 4532ErrorUtilities.ThrowInternalErrorUnreachable(); 4626ErrorUtilities.VerifyThrowArgumentLength(name);
Definition\ProjectCollection.cs (19)
514ErrorUtilities.VerifyThrow(_defaultToolsVersion != null, "Should have a default"); 521ErrorUtilities.VerifyThrowArgumentLength(value, nameof(DefaultToolsVersion)); 529ErrorUtilities.ThrowInvalidOperation("UnrecognizedToolsVersion", value, toolsVersionList); 1013ErrorUtilities.VerifyThrowArgumentNull(toolset); 1029ErrorUtilities.VerifyThrowArgumentLength(toolsVersion); 1073ErrorUtilities.VerifyThrowArgumentLength(toolsVersion); 1160ErrorUtilities.VerifyThrowArgumentLength(fileName); 1351ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded"); 1382ErrorUtilities.VerifyThrowArgumentNull(projectRootElement); 1393ErrorUtilities.ThrowInvalidOperation("OM_ProjectXmlCannotBeUnloadedDueToLoadedProjects", projectRootElement.FullPath, conflictingProject.FullPath); 1532ErrorUtilities.VerifyThrowArgumentNull(projectRootElement); 1580ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded"); 1611ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(project.ProjectCollection, this), "OM_IncorrectObjectAssociation", "Project", "ProjectCollection"); 1671ErrorUtilities.VerifyThrowArgumentNull(logger); 1752ErrorUtilities.ThrowInternalError("Throwing from logger shutdown", ex); 1945ErrorUtilities.VerifyThrowArgumentNull(originalLogger); 2145ErrorUtilities.VerifyThrow(_buildTimeEventSource == null, "Already registered for build-time."); 2175ErrorUtilities.VerifyThrow(_designTimeEventSource != null, "Already unregistered for design-time."); 2550ErrorUtilities.ThrowInvalidOperation("OM_MatchingProjectAlreadyInCollection", existing.FullPath);
Definition\ProjectImportPathMatch.cs (2)
32ErrorUtilities.VerifyThrowArgumentNull(propertyName); 33ErrorUtilities.VerifyThrowArgumentNull(searchPaths);
Definition\ProjectItem.cs (19)
130ErrorUtilities.VerifyThrowInternalNull(project); 131ErrorUtilities.VerifyThrowArgumentNull(xml); 134ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeEscaped); 135ErrorUtilities.VerifyThrowArgumentNull(evaluatedIncludeBeforeWildcardExpansionEscaped); 415ErrorUtilities.VerifyThrowArgumentLength(name); 481ErrorUtilities.VerifyThrowArgumentLength(name); 586ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 587ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name); 588ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 643ErrorUtilities.VerifyThrowArgumentLength(name); 644ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 646ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 653ErrorUtilities.VerifyThrowInvalidOperation(itemDefinitionMetadata == null, "OM_CannotRemoveMetadataOriginatingFromItemDefinition", name); 696ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 790ErrorUtilities.VerifyThrowArgumentLength(newItemType, "ItemType"); 792ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 945set { ErrorUtilities.ThrowInternalError("Cannot change the item type on ProjectItem.ProjectItemFactory"); } 1020ErrorUtilities.VerifyThrowInternalNull(_xml, "xml"); 1044ErrorUtilities.VerifyThrowInternalNull(_xml, "xml");
Definition\ProjectItemDefinition.cs (4)
58ErrorUtilities.VerifyThrowInternalNull(project); 59ErrorUtilities.VerifyThrowArgumentLength(itemType); 154ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 155ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
Definition\ProjectMetadata.cs (7)
60ErrorUtilities.VerifyThrowArgumentNull(parent); 61ErrorUtilities.VerifyThrowArgumentNull(xml); 73ErrorUtilities.VerifyThrowArgumentNull(parent); 74ErrorUtilities.VerifyThrowArgumentNull(xml); 75ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped); 134ErrorUtilities.VerifyThrowArgumentNull(value, "value"); 136ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
Definition\ProjectProperty.cs (14)
43ErrorUtilities.VerifyThrowArgumentNull(project); 52ErrorUtilities.VerifyThrowArgumentNull(project); 53ErrorUtilities.VerifyThrowArgumentNull(evaluatedValueEscaped); 362ErrorUtilities.VerifyThrowArgumentNull(xml); 363ErrorUtilities.VerifyThrowInvalidOperation(!ProjectHasMatchingGlobalProperty(project, xml.Name), "OM_GlobalProperty", xml.Name); 405ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 507ErrorUtilities.VerifyThrowArgumentNull(predecessor); 547ErrorUtilities.VerifyThrowArgumentLength(name); 548ErrorUtilities.VerifyThrowInvalidOperation(isGlobalProperty || !ProjectHasMatchingGlobalProperty(project, name), "OM_GlobalProperty", name); 549ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name); 550ErrorUtilities.VerifyThrowArgument(mayBeReserved || !ReservedPropertyNames.IsReservedProperty(name), "OM_ReservedName", name); 591ErrorUtilities.VerifyThrowInvalidOperation(!IsReservedProperty, "OM_ReservedName", _name); 592ErrorUtilities.VerifyThrowInvalidOperation(!IsGlobalProperty, "OM_GlobalProperty", _name); 606ErrorUtilities.ThrowInternalErrorUnreachable();
Definition\ResolvedImport.cs (2)
26ErrorUtilities.VerifyThrowInternalNull(importedProject, "child"); 40ErrorUtilities.VerifyThrowInternalNull(importedProject, "child");
Definition\SubToolset.cs (1)
39ErrorUtilities.VerifyThrowArgumentLength(subToolsetVersion);
Definition\Toolset.cs (6)
273ErrorUtilities.VerifyThrowArgumentLength(toolsVersion); 274ErrorUtilities.VerifyThrowArgumentLength(toolsPath); 275ErrorUtilities.VerifyThrowArgumentNull(environmentProperties); 276ErrorUtilities.VerifyThrowArgumentNull(globalProperties); 352ErrorUtilities.VerifyThrowInternalNull(getFiles); 353ErrorUtilities.VerifyThrowInternalNull(loadXmlFromPath);
Definition\ToolsetConfigurationReader.cs (2)
13using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 72ErrorUtilities.VerifyThrowArgumentNull(readApplicationConfiguration);
Definition\ToolsetPropertyDefinition.cs (5)
6using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 41ErrorUtilities.VerifyThrowArgumentLength(name); 42ErrorUtilities.VerifyThrowArgumentNull(source); 45ErrorUtilities.VerifyThrowArgumentNull(value); 75ErrorUtilities.VerifyThrowInternalNull(value, "Value");
Definition\ToolsetReader.cs (3)
16using ErrorUtils = Microsoft.Build.Shared.ErrorUtilities; 309ErrorUtilities.VerifyThrow( 352ErrorUtils.VerifyThrowArgumentNull(toolsets, "Toolsets");
Definition\ToolsetRegistryReader.cs (2)
65ErrorUtilities.VerifyThrowArgumentNull(msbuildRegistryWrapper, nameof(msbuildRegistryWrapper)); 237ErrorUtilities.VerifyThrowArgumentLength(subToolsetVersion);
ElementLocation\ElementLocation.cs (5)
143ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 254ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(file, nameof(file)); 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\RegistryLocation.cs (1)
33ErrorUtilities.VerifyThrowInternalLength(registryPath, nameof(registryPath));
ElementLocation\XmlDocumentWithLocation.cs (2)
359ErrorUtilities.VerifyThrow(Path.IsPathRooted(fullPath), "should be full path"); 407ErrorUtilities.VerifyThrowInvalidOperation(!_loadAsReadOnly.HasValue || !_loadAsReadOnly.Value, "OM_CannotSaveFileLoadedAsReadOnly", _fullPath);
Errors\InternalLoggerException.cs (7)
40ErrorUtilities.ThrowInvalidOperation("InternalLoggerExceptionOnlyThrownByEngine"); 54ErrorUtilities.ThrowInvalidOperation("InternalLoggerExceptionOnlyThrownByEngine"); 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.");
Errors\InvalidProjectFileException.cs (2)
218ErrorUtilities.VerifyThrowArgumentNull(projectFile); 219ErrorUtilities.VerifyThrowArgumentLength(message);
Errors\InvalidToolsetDefinitionException.cs (2)
64ErrorUtilities.VerifyThrowArgumentNull(info); 106ErrorUtilities.VerifyThrowArgumentNull(info);
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 (4)
4using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 93ErrorUtilities.VerifyThrow( 102ErrorUtilities.VerifyThrowInternalNull(tokenString); 169ErrorUtilities.ThrowInternalErrorUnreachable();
Evaluation\ConditionEvaluator.cs (8)
229ErrorUtilities.VerifyThrowArgumentNull(condition); 230ErrorUtilities.VerifyThrowArgumentNull(expander); 231ErrorUtilities.VerifyThrowArgumentLength(evaluationDirectory); 240ErrorUtilities.VerifyThrowArgumentNull(elementLocation); 430ErrorUtilities.VerifyThrowArgumentNull(condition); 431ErrorUtilities.VerifyThrowArgumentNull(expander); 432ErrorUtilities.VerifyThrowArgumentNull(evaluationDirectory); 433ErrorUtilities.VerifyThrowArgumentNull(elementLocation);
Evaluation\Context\EvaluationContext.cs (2)
97ErrorUtilities.VerifyThrowArgument( 133ErrorUtilities.ThrowInternalErrorUnreachable();
Evaluation\Evaluator.cs (13)
216ErrorUtilities.VerifyThrowInternalNull(data); 217ErrorUtilities.VerifyThrowInternalNull(projectRootElementCache); 218ErrorUtilities.VerifyThrowInternalNull(evaluationContext); 219ErrorUtilities.VerifyThrowInternalNull(loggingService); 220ErrorUtilities.VerifyThrowInternalNull(buildEventContext); 365ErrorUtilities.VerifyThrowArgumentLength(unevaluatedIncludeEscaped); 571ErrorUtilities.ThrowInternalError("Unexpected child"); 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."); 927ErrorUtilities.ThrowInternalError("Unexpected child type"); 1479ErrorUtilities.ThrowInternalError("Unexpected child type"); 1772ErrorUtilities.ThrowArgumentOutOfRange(nameof(mode));
Evaluation\Expander.cs (18)
239ErrorUtilities.VerifyThrowObjectDisposed(!_disposed, nameof(SpanBasedConcatenator)); 496ErrorUtilities.VerifyThrowInternalNull(elementLocation); 517ErrorUtilities.VerifyThrowInternalNull(elementLocation); 531ErrorUtilities.VerifyThrow((options & ExpanderOptions.BreakOnNotEmpty) == 0, "not supported"); 565ErrorUtilities.VerifyThrowInternalNull(elementLocation); 639ErrorUtilities.VerifyThrowInternalNull(elementLocation); 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."); 3726ErrorUtilities.ThrowArgument("CouldNotDifferentiateBetweenCompatibleMethods", _methodMethodName, args.Length); 5045ErrorUtilities.VerifyThrow(cachedTypeInformation.Item1 != null || cachedTypeInformation.Item2 != null, "Function type information needs either string or type represented."); 5063ErrorUtilities.VerifyThrowInternalNull(receiverType, $"Type information for {typeName} was present in the allowlist cache as {assemblyQualifiedTypeName} but the type could not be loaded.");
Evaluation\IntrinsicFunctions.cs (3)
477ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", runtime, "Runtime", XMakeAttributes.MSBuildRuntimeValues.clr2, XMakeAttributes.MSBuildRuntimeValues.clr4, XMakeAttributes.MSBuildRuntimeValues.currentRuntime, XMakeAttributes.MSBuildRuntimeValues.any); 482ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", architecture, "Architecture", XMakeAttributes.MSBuildArchitectureValues.x86, XMakeAttributes.MSBuildArchitectureValues.x64, XMakeAttributes.MSBuildArchitectureValues.currentArchitecture, XMakeAttributes.MSBuildArchitectureValues.any); 777ErrorUtilities.ThrowArgument(keyName);
Evaluation\ItemSpec.cs (1)
411ErrorUtilities.ThrowInternalErrorUnreachable();
Evaluation\LazyItemEvaluator.cs (1)
524ErrorUtilities.ThrowInternalErrorUnreachable();
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
125ErrorUtilities.VerifyThrow(
Evaluation\ProjectChangedEventArgs.cs (1)
22ErrorUtilities.VerifyThrowArgumentNull(project);
Evaluation\ProjectParser.cs (2)
99ErrorUtilities.VerifyThrowInternalNull(project); 100ErrorUtilities.VerifyThrowInternalNull(document);
Evaluation\ProjectRootElementCache.cs (11)
17using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 108ErrorUtilities.VerifyThrow( 257ErrorUtilities.VerifyThrow( 262ErrorUtilities.VerifyThrowInternalRooted(projectFile); 350ErrorUtilities.VerifyThrowInternalNull(projectRootElement, "projectRootElement"); 351ErrorUtilities.VerifyThrow( 398ErrorUtilities.VerifyThrowArgumentLength(oldFullPath); 518ErrorUtilities.VerifyThrowArgumentNull(projectRootElement); 539ErrorUtilities.VerifyThrowInternalNull(projectRootElement.FullPath, "FullPath"); 543ErrorUtilities.VerifyThrowInternalRooted(oldFullPathIfAny); 544ErrorUtilities.VerifyThrow(_weakCache[oldFullPathIfAny] == projectRootElement, "Should already be present");
Evaluation\ProjectXmlChangedEventArgs.cs (1)
37ErrorUtilities.VerifyThrowArgumentNull(projectXml);
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (2)
46ErrorUtilities.VerifyThrowInternalNull(dataToWrap); 47ErrorUtilities.VerifyThrowInternalNull(evaluationLoggingContext);
Evaluation\SimpleProjectRootElementCache.cs (5)
43ErrorUtilities.VerifyThrowInternalRooted(projectFile); 65ErrorUtilities.VerifyThrowInternalNull(rootElement, "projectRootElement"); 66ErrorUtilities.VerifyThrow( 74ErrorUtilities.VerifyThrow(_cache.TryGetValue(key, out _), 124ErrorUtilities.VerifyThrowArgumentNull(projectRootElement);
Evaluation\ToolsetProvider.cs (1)
69ErrorUtilities.VerifyThrowArgumentLength(toolsVersion);
EventArgsFormatting.cs (5)
72ErrorUtilities.VerifyThrowArgumentNull(e); 89ErrorUtilities.VerifyThrowArgumentNull(e); 105ErrorUtilities.VerifyThrowArgumentNull(e); 122ErrorUtilities.VerifyThrowArgumentNull(e); 151ErrorUtilities.VerifyThrowArgumentNull(e);
FileMatcher.cs (8)
231ErrorUtilities.ThrowInternalError("Unexpected filesystem entity type."); 449ErrorUtilities.VerifyThrow(!HasWildcards(path), 519ErrorUtilities.VerifyThrow(entries.Count == 1, 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( 1678ErrorUtilities.ThrowInternalError("Unexpected empty 'input' provided.");
FileUtilities.cs (10)
191ErrorUtilities.ThrowArgument("DebugPathTooLong", directory); 392ErrorUtilities.VerifyThrowInternalLength(path, nameof(path)); 393ErrorUtilities.VerifyThrow(trailingSegmentsToKeep >= 0, "trailing segments must be positive"); 464ErrorUtilities.VerifyThrowArgumentLength(path); 1135ErrorUtilities.VerifyThrowArgumentNull(basePath); 1136ErrorUtilities.VerifyThrowArgumentLength(path); 1144ErrorUtilities.VerifyThrow(splitPath.Length > 0, "Cannot call MakeRelative on a path of only slashes."); 1273ErrorUtilities.VerifyThrowArgumentNull(root); 1274ErrorUtilities.VerifyThrowArgumentNull(paths); 1484ErrorUtilities.ThrowArgument("InvalidGetPathOfFileAboveParameter", file);
FrameworkLocationHelper.cs (12)
635ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 645ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 670ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 680ErrorUtilities.VerifyThrowArgument(visualStudioSpec.SupportedDotNetFrameworkVersions.Contains(dotNetFrameworkVersion), "FrameworkLocationHelper.UnsupportedFrameworkVersion", dotNetFrameworkVersion); 975ErrorUtilities.VerifyThrowArgumentNull(targetFrameworkRootPath); 976ErrorUtilities.VerifyThrowArgumentNull(frameworkName); 990ErrorUtilities.ThrowInvalidOperation("FrameworkLocationHelper.CouldNotGenerateReferenceAssemblyDirectory", targetFrameworkRootPath, frameworkName.ToString(), e.Message); 1004ErrorUtilities.VerifyThrowArgumentOutOfRange(numberOfLevelsToRemove > 0, nameof(numberOfLevelsToRemove)); 1119ErrorUtilities.VerifyThrowArgument(VisualStudioSpecDict.Value.TryGetValue(version, out VisualStudioSpec spec), "FrameworkLocationHelper.UnsupportedVisualStudioVersion", version); 1125ErrorUtilities.VerifyThrowArgument(DotNetFrameworkSpecDict.Value.TryGetValue(version, out DotNetFrameworkSpec spec), "FrameworkLocationHelper.UnsupportedFrameworkVersion", version); 1551ErrorUtilities.VerifyThrowArgument(this._visualStudioVersion != null, "FrameworkLocationHelper.UnsupportedFrameworkVersionForWindowsSdk", this.Version); 1557ErrorUtilities.ThrowArgument("FrameworkLocationHelper.UnsupportedFrameworkVersionForWindowsSdk", this.Version);
Globbing\CompositeGlob.cs (1)
88ErrorUtilities.VerifyThrowArgumentNull(globs);
Globbing\MSBuildGlob.cs (5)
94ErrorUtilities.VerifyThrowArgumentNull(stringToMatch); 118ErrorUtilities.VerifyThrowArgumentNull(stringToMatch); 171ErrorUtilities.VerifyThrowArgumentNull(globRoot); 172ErrorUtilities.VerifyThrowArgumentNull(fileSpec); 173ErrorUtilities.VerifyThrowArgumentInvalidPath(globRoot, nameof(globRoot));
Globbing\MSBuildGlobWithGaps.cs (4)
44ErrorUtilities.VerifyThrowArgumentNull(mainGlob); 45ErrorUtilities.VerifyThrowArgumentNull(gaps); 58ErrorUtilities.VerifyThrowArgumentNull(mainGlob); 59ErrorUtilities.VerifyThrowArgumentNull(gaps);
Graph\GraphBuilder.cs (6)
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"); 262ErrorUtilities.VerifyThrowArgument(entryPoints.Count == 1, "StaticGraphAcceptsSingleSolutionEntryPoint"); 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\GraphBuildRequestData.cs (3)
58ErrorUtilities.VerifyThrowArgumentNull(projectGraph); 152ErrorUtilities.VerifyThrowArgumentNull(projectGraphEntryPoints); 160ErrorUtilities.VerifyThrowArgumentNull(projectGraphEntryPoints);
Graph\GraphBuildSubmission.cs (2)
59ErrorUtilities.VerifyThrow(BuildResult != null, 67ErrorUtilities.VerifyThrow(result.SubmissionId == SubmissionId,
Graph\ProjectGraph.cs (3)
424ErrorUtilities.VerifyThrowArgumentNull(projectCollection); 501ErrorUtilities.VerifyThrowArgumentNull(nodeIdProvider); 587ErrorUtilities.VerifyThrow(toposort.Count == graphNodes.Count, "sorted node count must be equal to total node count");
Graph\ProjectGraphEntryPoint.cs (1)
32ErrorUtilities.VerifyThrowArgumentLength(projectFile);
Graph\ProjectGraphNode.cs (2)
30ErrorUtilities.VerifyThrowInternalNull(projectInstance); 79ErrorUtilities.VerifyThrow(reference._referencingProjects.Contains(this), "references should point to the nodes referencing them");
Graph\ProjectInterpretation.cs (7)
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"); 385ErrorUtilities.VerifyThrowInternalNull(projectReference); 386ErrorUtilities.VerifyThrowArgumentNull(requesterGlobalProperties);
InprocTrackingNativeMethods.cs (2)
251ErrorUtilities.VerifyThrow(s_fileTrackerDllHandle != null, "fileTrackerDllHandle should not be null"); 252ErrorUtilities.VerifyThrow(!s_fileTrackerDllHandle.IsInvalid, "Handle for FileTracker.dll should not be invalid");
Instance\HostServices.cs (12)
69ErrorUtilities.VerifyThrowArgumentNull(projectFile); 70ErrorUtilities.VerifyThrowArgumentNull(targetName); 71ErrorUtilities.VerifyThrowArgumentNull(taskName); 134ErrorUtilities.VerifyThrowArgumentNull(projectFile); 135ErrorUtilities.VerifyThrowArgumentNull(targetName); 136ErrorUtilities.VerifyThrowArgumentNull(taskName); 142ErrorUtilities.VerifyThrowInvalidOperation(!hasExplicitOutOfProcAffinity || hostObject == null, "InvalidHostObjectOnOutOfProcProject"); 167ErrorUtilities.VerifyThrowArgumentNull(projectFile); 168ErrorUtilities.VerifyThrowArgumentNull(targetName); 169ErrorUtilities.VerifyThrowArgumentNull(taskName); 170ErrorUtilities.VerifyThrowArgumentNull(monikerName); 217ErrorUtilities.VerifyThrowInvalidOperation(nodeAffinity == NodeAffinity.InProc, "InvalidAffinityForProjectWithHostObject");
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (2)
151ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), count); 168ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), _projectElements.Count);
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (2)
90ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), _globalProperties.Count); 205ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), _parent._globalProperties.Count);
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (2)
28ErrorUtilities.VerifyThrowArgumentNull(getInstance); 90ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), Count);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
222ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), _list.Count);
Instance\ImmutableProjectCollections\ImmutableStringValuedListConverter.cs (1)
50ErrorUtilities.VerifyCollectionCopyToArguments(array, nameof(array), arrayIndex, nameof(arrayIndex), _itemList.Count);
Instance\ProjectInstance.cs (41)
297ErrorUtilities.VerifyThrowArgumentLength(projectFile); 298ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 371ErrorUtilities.VerifyThrowInternalNull(project); 428ErrorUtilities.VerifyThrowInternalNull(linkedProject); 615ErrorUtilities.VerifyThrowArgumentLength(projectFile); 616ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 617ErrorUtilities.VerifyThrowArgumentNull(buildParameters); 631ErrorUtilities.VerifyThrowArgumentNull(xml); 632ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 633ErrorUtilities.VerifyThrowArgumentNull(buildParameters); 643ErrorUtilities.VerifyThrowInternalNull(data); 644ErrorUtilities.VerifyThrowInternalLength(directory, nameof(directory)); 645ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(fullPath, nameof(fullPath)); 698ErrorUtilities.VerifyThrow(filter == null || isImmutable, 1458ErrorUtilities.ThrowInternalErrorUnreachable(); 1612ErrorUtilities.VerifyThrowArgumentNull(item); 1622ErrorUtilities.VerifyThrowArgumentNull(item); 1632ErrorUtilities.VerifyThrowArgumentNull(metadatum); 1643ErrorUtilities.VerifyThrowArgumentNull(item); 1653ErrorUtilities.VerifyThrowArgumentNull(item); 1664ErrorUtilities.VerifyThrowArgumentNull(property); 1718ErrorUtilities.ThrowInternalErrorUnreachable(); 1745ErrorUtilities.ThrowInternalErrorUnreachable(); 1759ErrorUtilities.ThrowInternalErrorUnreachable(); 1773ErrorUtilities.ThrowInternalErrorUnreachable(); 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."); 2540ErrorUtilities.VerifyThrowArgumentLength(projectFile); 2541ErrorUtilities.VerifyThrowArgumentNull(globalPropertiesInstances); 2542ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 2543ErrorUtilities.VerifyThrowArgumentNull(buildParameters); 2544ErrorUtilities.VerifyThrow(FileUtilities.IsSolutionFilename(projectFile), "Project file {0} is not a solution.", projectFile); 2674ErrorUtilities.ThrowInvalidOperation("OM_ProjectInstanceImmutable"); 2811ErrorUtilities.VerifyThrowInternalLength(targetName, nameof(targetName)); 2812ErrorUtilities.VerifyThrow(!_actualTargets.ContainsKey(targetName), "Target {0} already exists.", targetName); 3084ErrorUtilities.VerifyThrowArgumentNull(xml); 3085ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(explicitToolsVersion, "toolsVersion"); 3086ErrorUtilities.VerifyThrowArgumentNull(buildParameters); 3167ErrorUtilities.VerifyThrow(EvaluationId == BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation"); 3189ErrorUtilities.VerifyThrow(EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
Instance\ProjectItemDefinitionInstance.cs (1)
44ErrorUtilities.VerifyThrowArgumentNull(itemType);
Instance\ProjectItemGroupTaskInstance.cs (3)
53ErrorUtilities.VerifyThrowInternalNull(condition); 54ErrorUtilities.VerifyThrowInternalNull(location); 55ErrorUtilities.VerifyThrowInternalNull(items);
Instance\ProjectItemGroupTaskItemInstance.cs (9)
162ErrorUtilities.VerifyThrowInternalNull(itemType); 163ErrorUtilities.VerifyThrowInternalNull(include); 164ErrorUtilities.VerifyThrowInternalNull(exclude); 165ErrorUtilities.VerifyThrowInternalNull(remove); 166ErrorUtilities.VerifyThrowInternalNull(keepMetadata); 167ErrorUtilities.VerifyThrowInternalNull(removeMetadata); 168ErrorUtilities.VerifyThrowInternalNull(keepDuplicates); 169ErrorUtilities.VerifyThrowInternalNull(condition); 170ErrorUtilities.VerifyThrowInternalNull(location);
Instance\ProjectItemGroupTaskMetadataInstance.cs (4)
50ErrorUtilities.VerifyThrowInternalNull(name); 51ErrorUtilities.VerifyThrowInternalNull(value); 52ErrorUtilities.VerifyThrowInternalNull(condition); 53ErrorUtilities.VerifyThrowInternalNull(location);
Instance\ProjectItemInstance.cs (18)
204ErrorUtilities.VerifyThrowArgumentLength(value, "EvaluatedInclude"); 708ErrorUtilities.VerifyThrowArgumentNull(projectToUse, "project"); 709ErrorUtilities.VerifyThrowArgumentLength(itemTypeToUse, "itemType"); 711ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemTypeToUse), "OM_ReservedName", itemTypeToUse); 836ErrorUtilities.VerifyThrowArgumentLength(includeEscaped); 837ErrorUtilities.VerifyThrowArgumentLength(includeBeforeWildcardExpansionEscaped); 906ErrorUtilities.VerifyThrowArgumentNull(value, "ItemSpec"); 1023ErrorUtilities.VerifyThrowArgumentLength(value, "IncludeEscaped"); 1290ErrorUtilities.ThrowInternalErrorUnreachable(); 1299ErrorUtilities.ThrowInternalErrorUnreachable(); 1320ErrorUtilities.VerifyThrowArgumentLength(metadataName); 1414ErrorUtilities.VerifyThrowArgumentNull(destinationItem); 1988ErrorUtilities.VerifyThrowInternalLength(itemType, nameof(itemType)); 2018ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType"); 2051ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType"); 2077ErrorUtilities.VerifyThrowInternalLength(ItemType, "ItemType"); 2078ErrorUtilities.VerifyThrowInternalNull(source); 2227ErrorUtilities.ThrowInternalErrorUnreachable();
Instance\ProjectMetadataInstance.cs (4)
64ErrorUtilities.VerifyThrowArgumentLength(name); 68ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name); 72ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name) && !FileUtilities.ItemSpecModifiers.IsItemSpecModifier(name), "OM_ReservedName", name); 178ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only");
Instance\ProjectOnErrorInstance.cs (3)
58ErrorUtilities.VerifyThrowInternalLength(executeTargets, nameof(executeTargets)); 59ErrorUtilities.VerifyThrowInternalNull(condition); 60ErrorUtilities.VerifyThrowInternalNull(location);
Instance\ProjectPropertyGroupTaskInstance.cs (3)
53ErrorUtilities.VerifyThrowInternalNull(condition); 54ErrorUtilities.VerifyThrowInternalNull(location); 55ErrorUtilities.VerifyThrowInternalNull(properties);
Instance\ProjectPropertyGroupTaskPropertyInstance.cs (4)
50ErrorUtilities.VerifyThrowInternalNull(name); 51ErrorUtilities.VerifyThrowInternalNull(value); 52ErrorUtilities.VerifyThrowInternalNull(condition); 53ErrorUtilities.VerifyThrowInternalNull(location);
Instance\ProjectPropertyInstance.cs (6)
77ErrorUtilities.VerifyThrowArgumentNull(value); 174ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "write only"); 273ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "read only"); 325ErrorUtilities.VerifyThrowArgumentNull(escapedValue); 328ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name); 329ErrorUtilities.VerifyThrowArgument(mayBeReserved || !ReservedPropertyNames.IsReservedProperty(name), "OM_CannotCreateReservedProperty", name);
Instance\ProjectTargetInstance.cs (12)
165ErrorUtilities.VerifyThrowInternalLength(name, nameof(name)); 166ErrorUtilities.VerifyThrowInternalNull(condition); 167ErrorUtilities.VerifyThrowInternalNull(inputs); 168ErrorUtilities.VerifyThrowInternalNull(outputs); 169ErrorUtilities.VerifyThrowInternalNull(keepDuplicateOutputs); 170ErrorUtilities.VerifyThrowInternalNull(dependsOnTargets); 171ErrorUtilities.VerifyThrowInternalNull(beforeTargets); 172ErrorUtilities.VerifyThrowInternalNull(afterTargets); 173ErrorUtilities.VerifyThrowInternalNull(location); 174ErrorUtilities.VerifyThrowInternalNull(children); 175ErrorUtilities.VerifyThrowInternalNull(onErrorChildren); 544ErrorUtilities.VerifyThrowInternalLength(taskName, nameof(taskName));
Instance\ProjectTargetInstanceChild.cs (1)
48ErrorUtilities.ThrowInternalErrorUnreachable();
Instance\ProjectTaskInstance.cs (9)
101ErrorUtilities.VerifyThrowInternalNull(element); 102ErrorUtilities.VerifyThrowInternalNull(outputs); 164ErrorUtilities.VerifyThrowArgumentLength(name); 165ErrorUtilities.VerifyThrowArgumentNull(condition); 166ErrorUtilities.VerifyThrowArgumentNull(continueOnError); 340ErrorUtilities.VerifyThrowArgumentLength(taskOutputParameterName); 341ErrorUtilities.VerifyThrowArgumentLength(itemName); 353ErrorUtilities.VerifyThrowArgumentLength(taskOutputParameterName); 354ErrorUtilities.VerifyThrowArgumentLength(propertyName);
Instance\ProjectTaskInstanceChild.cs (1)
53ErrorUtilities.ThrowInternalErrorUnreachable();
Instance\ProjectTaskOutputItemInstance.cs (5)
60ErrorUtilities.VerifyThrowInternalLength(itemType, nameof(itemType)); 61ErrorUtilities.VerifyThrowInternalLength(taskParameter, nameof(taskParameter)); 62ErrorUtilities.VerifyThrowInternalNull(location); 63ErrorUtilities.VerifyThrowInternalNull(itemTypeLocation); 64ErrorUtilities.VerifyThrowInternalNull(taskParameterLocation);
Instance\ProjectTaskOutputPropertyInstance.cs (5)
60ErrorUtilities.VerifyThrowInternalLength(propertyName, nameof(propertyName)); 61ErrorUtilities.VerifyThrowInternalLength(taskParameter, nameof(taskParameter)); 62ErrorUtilities.VerifyThrowInternalNull(location); 63ErrorUtilities.VerifyThrowInternalNull(propertyNameLocation); 64ErrorUtilities.VerifyThrowInternalNull(taskParameterLocation);
Instance\ReflectableTaskPropertyInfo.cs (2)
37ErrorUtilities.VerifyThrowArgumentNull(taskType); 81ErrorUtilities.VerifyThrow(_propertyInfo != null, "Could not find property {0} on type {1} that the task factory indicated should exist.", Name, _taskType.FullName);
Instance\TaskFactories\AssemblyTaskFactory.cs (11)
118ErrorUtilities.ThrowInternalError("Use internal call to properly initialize the assembly task factory"); 143ErrorUtilities.ThrowInternalError("Use internal call to properly initialize the assembly task factory"); 167ErrorUtilities.ThrowInternalError("Use internal call to properly create a task instance from the assembly task factory"); 190ErrorUtilities.ThrowInternalError("Use internal call to properly create a task instance from the assembly task factory"); 205ErrorUtilities.VerifyThrowArgumentNull(task); 260ErrorUtilities.VerifyThrowArgumentNull(loadInfo); 272ErrorUtilities.VerifyThrowArgumentLength(taskName); 347ErrorUtilities.VerifyThrowInternalNull(buildComponentHost); 428ErrorUtilities.VerifyThrowArgumentLength(taskName, "TaskName"); 584ErrorUtilities.ThrowInternalError("How did we get two runtime values that were unmergeable?"); 596ErrorUtilities.ThrowInternalError("How did we get two runtime values that were unmergeable?");
Instance\TaskFactories\TaskHostTask.cs (4)
142ErrorUtilities.VerifyThrowInternalNull(taskType); 262ErrorUtilities.VerifyThrowInternalNull(_taskHostProvider, "taskHostProvider"); 428ErrorUtilities.ThrowInternalErrorUnreachable(); 559ErrorUtilities.ThrowInternalError("Unknown event args type.");
Instance\TaskFactoryLoggingHost.cs (7)
63ErrorUtilities.VerifyThrowArgumentNull(loggingContext); 64ErrorUtilities.VerifyThrowInternalNull(elementLocation); 157ErrorUtilities.VerifyThrowArgumentNull(e); 178ErrorUtilities.VerifyThrowArgumentNull(e); 199ErrorUtilities.VerifyThrowArgumentNull(e); 220ErrorUtilities.VerifyThrowArgumentNull(e); 360ErrorUtilities.VerifyThrow(_activeProxy, "Attempted to use an inactive task factory logging host.");
Instance\TaskFactoryWrapper.cs (7)
85ErrorUtilities.VerifyThrowArgumentNull(taskFactory); 86ErrorUtilities.VerifyThrowArgumentLength(taskName); 200ErrorUtilities.VerifyThrowArgumentNull(task); 201ErrorUtilities.VerifyThrowArgumentNull(property); 220ErrorUtilities.VerifyThrowArgumentNull(task); 221ErrorUtilities.VerifyThrowArgumentNull(property); 237ErrorUtilities.ThrowInternalError("Task does not implement IGeneratedTask and we don't have {0} either.", typeof(ReflectableTaskPropertyInfo).Name);
Instance\TaskRegistry.cs (14)
185ErrorUtilities.VerifyThrowInternalNull(projectRootElementCache); 205ErrorUtilities.VerifyThrowInternalNull(projectRootElementCache); 206ErrorUtilities.VerifyThrowInternalNull(toolset); 296ErrorUtilities.VerifyThrowInternalNull(directoryOfImportingFile); 298ErrorUtilities.VerifyThrowInternalError(!taskRegistry._isInitialized, "Attempt to modify TaskRegistry after it was initialized."); 467ErrorUtilities.VerifyThrowInternalError(_isInitialized, "Attempt to read from TaskRegistry before its initialization was finished."); 691ErrorUtilities.VerifyThrowInternalLength(taskName, nameof(taskName)); 692ErrorUtilities.VerifyThrowInternalNull(assemblyLoadInfo); 803ErrorUtilities.VerifyThrow(initialState == null || initialCount == null, "at most one can be non-null"); 1166ErrorUtilities.VerifyThrowArgumentNull(assemblyLoadInfo, "AssemblyLoadInfo"); 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"); 1616ErrorUtilities.VerifyThrowArgumentNull(projectUsingTaskXml); 1617ErrorUtilities.VerifyThrowArgumentNull(expander);
InterningBinaryReader.cs (3)
14using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 126ErrorUtilities.ThrowInternalError("From calculating based on the memorystream, about to read n = {0}. length = {1}, rawPosition = {2}, readLength = {3}, stringLength = {4}, currPos = {5}.", n, length, rawPosition, readLength, stringLength, currPos); 141ErrorUtilities.ThrowInternalError("From getting the length out of BaseStream.Read directly, about to read n = {0}. readLength = {1}, stringLength = {2}, currPos = {3}", n, readLength, stringLength, currPos);
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\BaseConsoleLogger.cs (2)
295ErrorUtilities.ThrowInternalError("Impossible"); 967ErrorUtilities.VerifyThrowArgumentNull(parameterName);
Logging\ConsoleLogger.cs (1)
338ErrorUtilities.VerifyThrowInvalidOperation(_consoleLogger != null, "MustCallInitializeBeforeApplyParameter");
Logging\DistributedLoggers\ConfigurableForwardingLogger.cs (2)
108ErrorUtilities.VerifyThrowArgumentNull(parameterName); 205ErrorUtilities.VerifyThrowArgumentNull(eventSource);
Logging\DistributedLoggers\DistributedFileLogger.cs (2)
97ErrorUtilities.VerifyThrowArgumentNull(eventSource); 189ErrorUtilities.ThrowInternalError("Should not be getting verbosity from distributed file logger");
Logging\FileLogger.cs (1)
59ErrorUtilities.VerifyThrowArgumentNull(eventSource);
Logging\NullCentralLogger.cs (1)
58ErrorUtilities.ThrowInvalidOperation("Should not receive any events other than build started or finished");
Logging\ParallelLogger\ParallelConsoleLogger.cs (15)
514ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 515ErrorUtilities.VerifyThrowArgumentNull(e.ParentProjectBuildEventContext, "ParentProjectBuildEventContext"); 654ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 658ErrorUtilities.VerifyThrow(startedEvent != null, "Project finished event for {0} received without matching start event", e.ProjectFile); 844ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 865ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 882ErrorUtilities.VerifyThrow(startedEvent != null, "Started event should not be null in the finished event handler"); 937ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 978ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 1028ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 1074ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 1132ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 1447ErrorUtilities.VerifyThrow(startedEvent != null, "Project Started should not be null in deferred target started"); 1578ErrorUtilities.VerifyThrowArgumentNull(e.BuildEventContext, "BuildEventContext"); 1742ErrorUtilities.VerifyThrow(_startedEvent != null, "Cannot have finished counter without started counter. ");
Logging\SerialConsoleLogger.cs (4)
714ErrorUtilities.ThrowInternalError("Unexpected frame type."); 753ErrorUtilities.VerifyThrow(this.Verbosity < LoggerVerbosity.Detailed, 764ErrorUtilities.ThrowInternalError("Unexpected frame type."); 806ErrorUtilities.ThrowInternalError(errorMessage);
LogMessagePacketBase.cs (3)
327ErrorUtilities.VerifyThrow(nodeBuildEvent != null, "nodeBuildEvent was null"); 527ErrorUtilities.VerifyThrow(_buildEvent is not null, "Not Supported LoggingEventType {0}", _eventType.ToString()); 901ErrorUtilities.ThrowInternalError("Not Supported LoggingEventType {0}", eventType.ToString());
Modifiers.cs (8)
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]), 588ErrorUtilities.ThrowInternalError("\"{0}\" is not a valid item-spec modifier.", modifier); 597ErrorUtilities.ThrowInternalError("\"{0}\" is not a valid item-spec modifier.", modifier); 602ErrorUtilities.ThrowInvalidOperation("Shared.InvalidFilespecForTransform", modifier, itemSpec, e.Message);
MSBuildNameIgnoreCaseComparer.cs (2)
49ErrorUtilities.ThrowInternalError("Invalid lengthToCompare '{0}' {1} {2}", constrainedString, start, lengthToCompare); 54ErrorUtilities.ThrowInternalError("Invalid start '{0}' {1} {2}", constrainedString, start, lengthToCompare);
NodeEndpointOutOfProcBase.cs (9)
154ErrorUtilities.VerifyThrow(_status == LinkStatus.Inactive, "Link not inactive. Status is {0}", _status); 155ErrorUtilities.VerifyThrowArgumentNull(factory); 167ErrorUtilities.ThrowInternalError("Connect() not valid on the out of proc endpoint."); 273ErrorUtilities.VerifyThrow(_status != newStatus, "Attempting to change status to existing status {0}.", _status); 296ErrorUtilities.VerifyThrow(_packetPump.ManagedThreadId != Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread."); 317ErrorUtilities.VerifyThrowArgumentNull(packet); 318ErrorUtilities.VerifyThrow(_packetQueue != null, "packetQueue is null"); 319ErrorUtilities.VerifyThrow(_packetAvailable != null, "packetAvailable is null"); 671ErrorUtilities.ThrowInternalError("waitId {0} out of range.", waitId);
NodePacketFactory.cs (1)
55ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packetType);
OutOfProcTaskHostTaskResult.cs (3)
65ErrorUtilities.VerifyThrowInternalNull(taskException); 70ErrorUtilities.VerifyThrow( 79ErrorUtilities.VerifyThrow(exceptionMessage != null, "If we have message args, we need a message.");
PrintLineDebugger.cs (4)
30ErrorUtilities.VerifyThrowInternalNull(propertyInfo); 77ErrorUtilities.ThrowInternalError("Cannot set a new writer over an old writer. Remove the old one first"); 99ErrorUtilities.ThrowInternalError("Cannot unset an already null writer"); 161ErrorUtilities.ThrowInternalError($"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
ProjectErrorUtilities.cs (1)
255ErrorUtilities.VerifyThrowInternalNull(elementLocation);
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 (6)
38ErrorUtilities.VerifyThrow(backing != null, "Need backing collection"); 101ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 109ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 132ErrorUtilities.VerifyThrowArgumentNull(array); 155ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 188ErrorUtilities.VerifyThrowArgumentNull(array);
ReadOnlyEmptyCollection.cs (3)
87ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 95ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 118ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
ReadOnlyEmptyDictionary.cs (6)
176ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 185ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 201ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 219ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 227ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 250ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
Resources\AssemblyResources.cs (2)
32ErrorUtilities.VerifyThrow(s_msbuildExeResourceManager == null, "Only one extra resource manager"); 85ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name);
ResourceUtilities.cs (6)
42ErrorUtilities.VerifyThrowInternalNull(message); 438ErrorUtilities.ThrowInternalError( 464ErrorUtilities.ThrowInternalError("The resource string \"" + resourceName + "\" was not found."); 472ErrorUtilities.ThrowInternalError(e.Message); 479ErrorUtilities.ThrowInternalError(e.Message); 486ErrorUtilities.ThrowInternalError(e.Message);
StringExtensions.cs (3)
18ErrorUtilities.VerifyThrowArgumentNull(aString); 19ErrorUtilities.VerifyThrowArgumentNull(oldValue); 20ErrorUtilities.VerifyThrowArgumentLength(oldValue);
TaskHostConfiguration.cs (2)
166ErrorUtilities.VerifyThrowInternalLength(taskName, nameof(taskName)); 167ErrorUtilities.VerifyThrowInternalLength(taskLocation, nameof(taskLocation));
TaskHostTaskComplete.cs (1)
108ErrorUtilities.VerifyThrowInternalNull(result);
TaskLoggingHelper.cs (37)
51ErrorUtilities.VerifyThrowArgumentNull(taskInstance); 61ErrorUtilities.VerifyThrowArgumentNull(buildEngine); 62ErrorUtilities.VerifyThrowArgumentLength(taskName); 180ErrorUtilities.VerifyThrowArgumentNull(message); 204ErrorUtilities.VerifyThrowArgumentNull(resourceName); 205ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 209ErrorUtilities.VerifyThrowArgument(resourceString != null, "Shared.TaskResourceNotFound", resourceName, TaskName); 224ErrorUtilities.VerifyThrowArgumentNull(unformatted); 293ErrorUtilities.VerifyThrowArgumentNull(message); 320ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message); 329ErrorUtilities.VerifyThrow(errorCode == null, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message); 363ErrorUtilities.VerifyThrowArgumentNull(message); 373ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 425ErrorUtilities.VerifyThrowArgumentNull(message); 430ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 489ErrorUtilities.VerifyThrowArgumentNull(messageResourceName); 502ErrorUtilities.VerifyThrow(errorCode == null, errorCode, FormatResourceString(messageResourceName, messageArgs)); 513ErrorUtilities.VerifyThrowArgumentNull(filePath); 514ErrorUtilities.VerifyThrowArgumentNull(content); 604ErrorUtilities.VerifyThrowArgumentNull(commandLine); 618ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message); 700ErrorUtilities.VerifyThrowArgumentNull(message); 705ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 777ErrorUtilities.VerifyThrowArgumentNull(messageResourceName); 794ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'"); 860ErrorUtilities.VerifyThrowArgumentNull(messageResourceName); 928ErrorUtilities.VerifyThrowArgumentNull(exception); 1051ErrorUtilities.VerifyThrowArgumentNull(message); 1056ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 1147ErrorUtilities.VerifyThrowArgumentNull(messageResourceName); 1162ErrorUtilities.VerifyThrow(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'"); 1228ErrorUtilities.VerifyThrowArgumentNull(messageResourceName); 1280ErrorUtilities.VerifyThrowArgumentNull(exception); 1322ErrorUtilities.VerifyThrowArgumentNull(fileName); 1349ErrorUtilities.VerifyThrowArgumentNull(stream); 1377ErrorUtilities.VerifyThrowArgumentNull(lineOfText); 1435ErrorUtilities.ThrowInternalError("Impossible canonical part.");
TaskLoggingHelperExtension.cs (4)
93ErrorUtilities.VerifyThrowArgumentNull(resourceName); 94ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 95ErrorUtilities.VerifyThrowInvalidOperation(TaskSharedResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 105ErrorUtilities.VerifyThrowArgument(resourceString != null, "Shared.TaskResourceNotFound", resourceName, TaskName);
TaskParameter.cs (13)
115ErrorUtilities.VerifyThrow( 152ErrorUtilities.ThrowInternalErrorUnreachable(); 187ErrorUtilities.ThrowInternalErrorUnreachable(); 258ErrorUtilities.ThrowInternalErrorUnreachable(); 396ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.WriteToStream, "Cannot call this method when reading!"); 463ErrorUtilities.VerifyThrow(translator.Mode == TranslationDirection.ReadFromStream, "Cannot call this method when writing!"); 757ErrorUtilities.VerifyThrowInternalNull(escapedItemSpec); 848ErrorUtilities.VerifyThrowArgumentLength(metadataName); 852ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsDerivableItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 865ErrorUtilities.VerifyThrowArgumentNull(metadataName); 866ErrorUtilities.VerifyThrowArgument(!FileUtilities.ItemSpecModifiers.IsItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 888ErrorUtilities.VerifyThrowArgumentNull(destinationItem); 955ErrorUtilities.VerifyThrowArgumentNull(metadataName);
TempFileUtilities.cs (2)
162ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(directory, nameof(directory)); 188ErrorUtilities.VerifyThrow(!FileSystems.Default.FileExists(file), "Guid should be unique");
TypeLoader.cs (4)
70ErrorUtilities.VerifyThrow(isDesiredType != null, "need a type filter"); 309ErrorUtilities.VerifyThrowArgumentNull(typeFilter, "typefilter"); 310ErrorUtilities.VerifyThrowArgumentNull(loadInfo); 324ErrorUtilities.VerifyThrowArgumentNull(typeName);
Utilities\EngineFileUtilities.cs (3)
186ErrorUtilities.VerifyThrowInternalLength(filespecEscaped, nameof(filespecEscaped)); 209ErrorUtilities.DebugTraceMessage("Expanding wildcard for file spec {0}", filespecEscaped); 335ErrorUtilities.VerifyThrow(fileList != null, "We must have a list of files here, even if it's empty.");
Utilities\RegistryKeyWrapper.cs (3)
69ErrorUtilities.VerifyThrowArgumentNull(registryKeyPath); 70ErrorUtilities.VerifyThrowArgumentNull(registryHive); 163ErrorUtilities.VerifyThrowArgumentLength(name);
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");
XmlUtilities.cs (3)
72ErrorUtilities.VerifyThrowArgumentLength(name); 78ErrorUtilities.ThrowArgument("OM_NameInvalid", name, name[firstInvalidCharLocation]); 91ErrorUtilities.VerifyThrowArgumentLength(name);
Microsoft.Build.Engine.UnitTests (7)
ErrorUtilities_Tests.cs (7)
21ErrorUtilities.VerifyThrow(false, "msbuild rules"); 36ErrorUtilities.VerifyThrow(true, "msbuild rules"); 43ErrorUtilities.VerifyThrow(true, "blah"); 50ErrorUtilities.VerifyThrow(true, "{0}", "a"); 57ErrorUtilities.VerifyThrow(true, "{0}{1}", "a", "b"); 64ErrorUtilities.VerifyThrow(true, "{0}{1}{2}", "a", "b", "c"); 71ErrorUtilities.VerifyThrow(true, "{0}{1}{2}{3}", "a", "b", "c", "d");
Microsoft.Build.Framework.UnitTests (6)
ResourceUtilities.cs (6)
42ErrorUtilities.VerifyThrowInternalNull(message); 438ErrorUtilities.ThrowInternalError( 464ErrorUtilities.ThrowInternalError("The resource string \"" + resourceName + "\" was not found."); 472ErrorUtilities.ThrowInternalError(e.Message); 479ErrorUtilities.ThrowInternalError(e.Message); 486ErrorUtilities.ThrowInternalError(e.Message);
Microsoft.Build.UnitTests.Shared (2)
ObjectModelHelpers.cs (1)
1132ErrorUtilities.VerifyThrowArgumentNull(s);
TestEnvironment.cs (1)
318ErrorUtilities.VerifyThrowInternalNull(Output);