985 references to Assumed
Microsoft.Build (776)
BackEnd\BuildManager\BuildManager.cs (16)
935Assumed.NotNull(configuration.Project, "Configuration should have been loaded."); 1067Assumed.Zero(_buildSubmissions.Count, "All submissions not yet complete."); 1068Assumed.Zero(_activeNodes.Count, "All nodes not yet shut down."); 1496Assumed.False(submission.IsCompleted, "Submission already complete."); 1535Assumed.NotNull(submission.BuildRequestData.ProjectInstance, "Unexpected null path for a submission with no ProjectInstance."); 1607Assumed.NotNull(resolvedConfiguration, "Cannot call project cache without having BuildRequestConfiguration"); 1728Assumed.True(FileUtilities.IsSolutionFilename(config.ProjectFullPath), $"{config.ProjectFullPath} is not a solution"); 1900Assumed.Unreachable($"Unexpected packet received by BuildManager: {packet.Type}"); 2224Assumed.Null(submission.BuildResult?.Exception, "Exceptions only get set when the graph submission gets completed with an exception in OnThreadException. That should not happen during graph builds."); 2390Assumed.Equal(_buildManagerState, requiredState, $"Expected state {requiredState}, actual state {_buildManagerState}"); 2738Assumed.True(_activeNodes.Contains(node), $"Unexpected shutdown from node {node} which shouldn't exist."); 2941Assumed.Unreachable($"Scheduling action {response.Action} not handled."); 3382Assumed.NotNull(castPacket, $"Incorrect packet type: {packet.Type} should have been {expectedType}"); 3470Assumed.NotNull(inputCacheFiles); 3471Assumed.Null(_configCache, "caches must not be set at this point"); 3472Assumed.Null(_resultsCache, "caches must not be set at this point");
BackEnd\BuildManager\BuildParameters.cs (2)
286Assumed.NotNull(other); 765Assumed.NotNull(value, valueExpression: "EnvironmentPropertiesInternal");
BackEnd\BuildManager\BuildSubmission.cs (2)
199Assumed.NotNull(BuildResult, "BuildResult is not populated after Execute is done."); 216Assumed.NotNull(BuildRequest, "BuildRequest is not populated while reporting failed result.");
BackEnd\BuildManager\CacheAggregator.cs (7)
31Assumed.NotNull(configCache); 32Assumed.NotNull(resultsCache); 33Assumed.False(_aggregated, "Cannot add after aggregation"); 40Assumed.False(_aggregated, "Cannot aggregate twice"); 60Assumed.Equal(configs.Length, results.Length, "Assuming 1-to-1 mapping between configs and results. Otherwise it means the caches are either not minimal or incomplete"); 74Assumed.Null(_aggregatedConfigCache.GetMatchingConfiguration(config), "Input caches should not contain entries for the same configuration"); 87Assumed.True(seenConfigIds.Contains(result.ConfigurationId), "Each result should have a corresponding configuration. Otherwise the caches are not consistent");
BackEnd\BuildManager\CacheSerialization.cs (5)
23Assumed.NotNull(outputCacheFile); 45_ => Assumed.Unreachable<ConfigCache>(), 52_ => Assumed.Unreachable<ResultsCache>(), 116Assumed.NotNull(configCache); 117Assumed.NotNull(resultsCache);
BackEnd\BuildManager\LegacyThreadingData.cs (8)
58Assumed.True(_instanceForMainThread == null || (_instanceForMainThread != null && value == null) || (_instanceForMainThread == value), "Should not assign to instanceForMainThread twice without cleaning it"); 91Assumed.False(_legacyThreadingEventsById.ContainsKey(submissionId), $"Submission {submissionId} should not already be registered with LegacyThreadingData"); 107Assumed.True(_legacyThreadingEventsById.ContainsKey(submissionId), $"Submission {submissionId} should have been previously registered with LegacyThreadingData"); 130Assumed.NotNull(legacyThreadingEvents, $"We're trying to wait on the legacy thread for submission {submissionId}, but that submission has not been registered."); 148Assumed.NotNull(legacyThreadingEvents, $"We're trying to track when the legacy thread for submission {submissionId} goes inactive, but that submission has not been registered."); 158Assumed.NotNull(instance?.RequestEntry?.Request, "Cannot signal legacy thread start for a RequestBuilder without a request"); 169Assumed.NotNull(legacyThreadingEvents, $"We're trying to signal that the legacy thread is ready for submission {submissionId} to execute, but that submission has not been registered"); 191Assumed.NotNull(legacyThreadingEvents, $"We're trying to signal that submission {submissionId} is done with the legacy thread, but that submission has not been registered");
BackEnd\Client\MSBuildClientPacketPump.cs (2)
285Assumed.NotEqual(bytesRead, 0, $"Incomplete packet read. {packetBytesRead} of {packetLength} bytes read"); 320Assumed.Unreachable($"WaitId {waitId} out of range.");
BackEnd\Components\BuildComponentFactoryCollection.cs (3)
138Assumed.Equal(_componentEntriesByType[componentType].Pattern, CreationPattern.Singleton, $"Previously existing factory for type {componentType} was not a singleton factory."); 160Assumed.True(_componentEntriesByType.TryGetValue(type, out BuildComponentEntry componentEntry), $"No factory registered for component type {type}"); 241Assumed.Equal(Pattern, CreationPattern.Singleton, "Cannot shutdown non-singleton.");
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (21)
221Assumed.NotNull(_componentHost, "BuildRequestEngine not initialized by component host."); 222Assumed.Equal(_status, BuildRequestEngineStatus.Uninitialized, $"Engine must be in the Uninitiailzed state, but is {_status}"); 252Assumed.True(_status is BuildRequestEngineStatus.Active or BuildRequestEngineStatus.Idle or BuildRequestEngineStatus.Waiting, $"Engine must be Active, Idle or Waiting to clean up, but is {_status}."); 254Assumed.NotNull(_nodeLoggingContext, "Node logging context not set."); 371Assumed.True(_status is not (BuildRequestEngineStatus.Shutdown or BuildRequestEngineStatus.Uninitialized), $"Engine loop not yet started, status is {_status}."); 374Assumed.False(_requestsByGlobalRequestId.ContainsKey(request.GlobalRequestId), $"Request {request.GlobalRequestId} is already known to the engine."); 375Assumed.True(_configCache.HasConfiguration(request.ConfigurationId), $"Request {request.GlobalRequestId} refers to configuration {request.ConfigurationId} which is not known to the engine."); 456Assumed.True(_status is not (BuildRequestEngineStatus.Shutdown or BuildRequestEngineStatus.Uninitialized), $"Engine loop not yet started, status is {_status}."); 457Assumed.True(_requestsByGlobalRequestId.ContainsKey(unblocker.BlockedRequestId), $"Request {unblocker.BlockedRequestId} is not known to the engine."); 561Assumed.True(_status is not (BuildRequestEngineStatus.Shutdown or BuildRequestEngineStatus.Uninitialized), $"Engine loop not yet started, status is {_status}."); 564Assumed.NotNull(_componentHost, "No host object set"); 651Assumed.Null(_componentHost, "BuildRequestEngine already initialized!"); 668Assumed.Equal(_status, BuildRequestEngineStatus.Uninitialized, $"Cleanup wasn't called, status is {_status}"); 681Assumed.Equal(type, BuildComponentType.RequestEngine, $"Cannot create component of type {type}"); 790Assumed.Null(activeEntry, "Multiple active requests"); 816Assumed.Unreachable($"Unexpected BuildRequestEntry state {currentEntry.State}"); 974Assumed.NotNull(_componentHost, "No host object set"); 1174Assumed.NotNull(_componentHost, "No host object set"); 1346Assumed.True((requestsToIssue == null) || (requestsToIssue.Count == 0), "Entry shouldn't be ready if we also issued requests."); 1400Assumed.True(config.WasGeneratedByNode, "InvalidConfigurationId"); 1401Assumed.True(_unresolvedConfigurationsById.ContainsKey(config.ConfigurationId), "NoUnresolvedConfiguration");
BackEnd\Components\BuildRequestEngine\BuildRequestEntry.cs (20)
129Assumed.Equal(requestConfiguration.ConfigurationId, request.ConfigurationId, "Configuration id mismatch"); 187Assumed.True(value == null || _requestBuilder == null, "Request Builder already set."); 204Assumed.True(configuration.WasGeneratedByNode, "Configuration has already been resolved."); 226Assumed.Equal(State, BuildRequestEntryState.Active, $"Must be in Active state to wait for blocking request. Config: {RequestConfiguration.ConfigurationId} State: {State}"); 317Assumed.True(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: {RequestConfiguration.ConfigurationId} State: {State} Requests: {_outstandingRequests != null}"); 344Assumed.True(result.CircularDependency, "Received result for target in progress and it wasn't a circular dependency error."); 376Assumed.False(_outstandingResults.ContainsKey(result.NodeRequestId), "Request already contains results."); 395Assumed.Equal(State, BuildRequestEntryState.Waiting, $"Entry must be in the waiting state to be unblocked. Config: {RequestConfiguration.ConfigurationId} State: {State} Request: {Request.GlobalRequestId}"); 396Assumed.NotEqual(_blockingGlobalRequestId, BuildRequest.InvalidGlobalRequestId, $"Entry must be waiting on another request to be unblocked. Config: {RequestConfiguration.ConfigurationId} Request: {Request.GlobalRequestId}"); 413Assumed.Null(_unresolvedConfigurations, "All configurations must be resolved before Continue may be called."); 414Assumed.Null(_outstandingRequests, "All outstanding requests must have been satisfied."); 415Assumed.Equal(State, BuildRequestEntryState.Ready, $"Entry must be in the Ready state. Config: {RequestConfiguration.ConfigurationId} State: {State}"); 485Assumed.Null(Result, "Entry already Completed."); 492Assumed.Equal(State, BuildRequestEntryState.Active, $"Entry must be active before it can be Completed successfully. Config: {RequestConfiguration.ConfigurationId} State: {State}"); 493Assumed.Null(_unresolvedConfigurations, "Entry must not have any unresolved configurations."); 494Assumed.Null(_outstandingRequests, "Entry must have no outstanding requests."); 495Assumed.Null(_outstandingResults, "Results must be consumed before request may be completed."); 513Assumed.True(State is BuildRequestEntryState.Active or BuildRequestEntryState.Waiting, $"Must be in Active or Waiting state to wait for results. Config: {RequestConfiguration.ConfigurationId} State: {State}"); 519Assumed.False(_outstandingRequests.ContainsKey(newRequest.NodeRequestId), $"Already waiting for local request {newRequest.NodeRequestId}"); 524Assumed.True(addToIssueList, "Requests with unresolved configurations should always be added to the issue list.");
BackEnd\Components\Caching\ConfigCache.cs (5)
77Assumed.True(config.ConfigurationId != 0, "Invalid configuration ID"); 78Assumed.True(configurations.ById.TryAdd(config.ConfigurationId, config), $"Configuration {config.ConfigurationId} already cached"); 144Assumed.True(configuration.IsLoaded, "Request to create configuration did not honor request to also load project."); 182Assumed.False(configurations.ById.IsEmpty, "No configurations exist from which to obtain the smallest configuration id."); 337Assumed.Equal(componentType, BuildComponentType.ConfigCache, $"Cannot create components of type {componentType}");
BackEnd\Components\Caching\ConfigCacheWithOverride.cs (5)
44=> Assumed.Unreachable(); 53Assumed.False(CurrentCache.HasConfiguration(configId), "caches should not overlap"); 76Assumed.Null(CurrentCache.GetMatchingConfiguration(config), "caches should not overlap"); 93Assumed.Null(CurrentCache.GetMatchingConfiguration(configMetadata), "caches should not overlap"); 115Assumed.False(CurrentCache.HasConfiguration(configId), "caches should not overlap");
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (3)
36Assumed.True(IsCollectionEmptyOrUncreated(RegisteredTaskObjectLifetime.Build), "Build lifetime objects were not disposed at the end of the build"); 59Assumed.Equal(type, BuildComponentType.RegisteredTaskObjectCache, $"Cannot create components of type {type}"); 70Assumed.True(IsCollectionEmptyOrUncreated(RegisteredTaskObjectLifetime.Build), "Build lifetime objects were not disposed at the end of the build");
BackEnd\Components\Caching\ResultsCache.cs (5)
83Assumed.True(_resultsByConfiguration.TryAdd(result.ConfigurationId, result), $"Failed to add result for configuration {result.ConfigurationId}"); 111Assumed.True(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest"); 119Assumed.True(result.HasResultsForTarget(target), "No results in cache for target " + target); 164Assumed.True(request.IsConfigurationResolved, "UnresolvedConfigurationInRequest"); 298Assumed.Equal(componentType, BuildComponentType.ResultsCache, $"Cannot create components of type {componentType}");
BackEnd\Components\Caching\ResultsCacheWithOverride.cs (4)
32=> Assumed.Unreachable(); 50Assumed.Null(CurrentCache.GetResultForRequest(request), "caches should not overlap"); 64Assumed.Null(CurrentCache.GetResultsForConfiguration(configurationId), "caches should not overlap"); 87Assumed.Equal(CurrentCache.SatisfyRequest(
BackEnd\Components\Communications\CurrentHost.cs (1)
56: Assumed.Unreachable<string>();
BackEnd\Components\Communications\NodeEndpointInProc.cs (17)
171Assumed.NotNull(factory); 189Assumed.NotNull(factory); 219Assumed.Equal(_status, LinkStatus.Active, $"Cannot send when link status is not active. Current status {_status}"); 311Assumed.Equal(_status, LinkStatus.Active, $"Endpoint is not connected. Current status {_status}"); 328Assumed.NotEqual(_status, newStatus, $"Attempting to change status to existing status {_status}."); 342Assumed.Equal(_mode, EndpointMode.Asynchronous, "EndPoint mode is synchronous, should be asynchronous"); 343Assumed.NotNull(_packetQueue, "packetQueue is null"); 344Assumed.NotNull(_packetAvailable, "packetAvailable is null"); 357Assumed.Null(_packetPump, "packetPump != null"); 358Assumed.Null(_packetAvailable, "packetAvailable != null"); 359Assumed.Null(_terminatePacketPump, "terminatePacketPump != null"); 360Assumed.Null(_packetQueue, "packetQueue != null"); 394Assumed.NotNull(_packetPump, "packetPump == null"); 395Assumed.NotNull(_packetAvailable, "packetAvailable == null"); 396Assumed.NotNull(_terminatePacketPump, "terminatePacketPump == null"); 397Assumed.NotNull(_packetQueue, "packetQueue == null"); 453Assumed.Unreachable($"waitId {waitId} out of range.");
BackEnd\Components\Communications\NodeLauncher.cs (1)
84Assumed.NotNullOrEmpty(msbuildLocation);
BackEnd\Components\Communications\NodeManager.cs (6)
123Assumed.True(_nodeIdToProvider.TryGetValue(node, out INodeProvider? provider), $"Node {node} does not have a provider."); 134Assumed.False(_componentShutdown, "We should never be calling ShutdownNodes after ShutdownComponent has been called"); 165Assumed.Null(_componentHost, "NodeManager already initialized."); 166Assumed.NotNull(host, "We can't create a NodeManager with a null componentHost"); 284Assumed.Equal(type, BuildComponentType.NodeManager, $"Cannot create component of type {type}"); 311Assumed.NotNull(nodeProvider, "No node provider provided.");
BackEnd\Components\Communications\NodeProviderInProc.cs (9)
161Assumed.True(nodeExists, $"InProc node {nodeId} does not exist."); 266=> Assumed.Unreachable(); 272=> Assumed.Unreachable(); 278=> Assumed.Unreachable(); 284=> Assumed.Unreachable<INodePacket>(); 337Assumed.Equal(type, BuildComponentType.InProcNodeProvider, $"Cannot create component of type {type}"); 348Assumed.False(_nodeContexts.ContainsKey(nodeId), $"In Proc node {nodeId} already instantiated."); 383Assumed.True(connected, $"In-proc node failed to start up within {connectionTimeout}ms"); 420Assumed.True(foundEndpoint, "Received link status event for a node other than our peer.");
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (2)
137Assumed.True(_nodeContexts.ContainsKey(nodeId), $"Invalid node id specified: {nodeId}."); 200Assumed.Equal(componentType, BuildComponentType.OutOfProcNodeProvider, $"Factory cannot create components of type {componentType}");
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
466Assumed.Positive(processNamesToSearch.Length, "Expected at least one process name to search for.");
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (8)
209Assumed.True(_nodeContexts.TryGetValue(nodeKey, out NodeContext context), $"Invalid host context specified: {nodeKey}."); 378Assumed.Unreachable($"PacketReceived: no handler for node {node}, unexpected packet type {packet.Type}"); 390Assumed.Equal(componentType, BuildComponentType.OutOfProcTaskHostNodeProvider, $"Factory cannot create components of type {componentType}"); 419Assumed.True(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost)); 451Assumed.True(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost)); 485Assumed.False(isArm64, "ARM64 CLR2 task hosts are not supported."); 515Assumed.True(Handshake.IsHandshakeOptionEnabled(hostContext, HandshakeOptions.TaskHost)); 715Assumed.False(_nodeContexts.ContainsKey(nodeKey), "We should not already have a node for this context! Did we forget to call DisconnectFromHost somewhere?");
BackEnd\Components\Communications\TaskHostNodeManager.cs (4)
67Assumed.False(_componentShutdown, "We should never be calling ShutdownNodes after ShutdownComponent has been called"); 88Assumed.Null(_componentHost, "TaskHostNodeManager already initialized."); 89Assumed.NotNull(host, "We can't create a TaskHostNodeManager with a null componentHost"); 178Assumed.Equal(type, BuildComponentType.TaskHostNodeManager, $"Cannot create component of type {type}");
BackEnd\Components\Communications\TranslatorExtensions.cs (4)
73Assumed.NotNull(type, "type cannot be null"); 74Assumed.True(typeof(T).IsAssignableFrom(type), $"{typeName} must be a {typeof(T).FullName}"); 75Assumed.True(typeof(ITranslatable).IsAssignableFrom(type), $"{typeName} must be a {nameof(ITranslatable)}"); 83Assumed.NotNull(constructor, $"{typeName} must have a private parameterless constructor");
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (2)
41Assumed.NotNull(sendData, "sendData delegate is null"); 135Assumed.NotNull(buildEvent, "buildEvent is null");
BackEnd\Components\Logging\CentralForwardingLogger.cs (1)
80Assumed.NotNull(eventSource, "eventSource is null");
BackEnd\Components\Logging\EvaluationLoggingContext.cs (1)
44Assumed.True(IsValid, "invalid");
BackEnd\Components\Logging\EventRedirectorToSink.cs (3)
37Assumed.NotNull(eventSink, "eventSink is null"); 38Assumed.PositiveOrZero(loggerId, "loggerId should be greater or equal to 0"); 53Assumed.NotNull(buildEvent, "buildEvent is null");
BackEnd\Components\Logging\LoggingContext.cs (1)
327=> Assumed.True(_isValid, $"LoggingContext (type: {GetType()}) was not valid during logging attempt.");
BackEnd\Components\Logging\LoggingService.cs (19)
894Assumed.NotEqual(_serviceState, LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 895Assumed.NotNull(buildComponentHost, "BuildComponentHost was null"); 933Assumed.NotEqual(_serviceState, LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1003Assumed.NotNull(packet, "packet was null"); 1006Assumed.Equal(packet.Type, NodePacketType.LogMessage, $"""Expected packet type "{nameof(NodePacketType.LogMessage)}" but instead got packet type "{packet.Type}"."""); 1011Assumed.NotEqual(loggingPacket.EventType, LoggingEventType.CustomEvent, "Custom event types are no longer supported. Does the sending node have a different version?"); 1028Assumed.NotEqual(_serviceState, LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1029Assumed.NotNull(logger, "logger was null"); 1117Assumed.NotEqual(_serviceState, LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1118Assumed.NotNull(forwardingLogger, "forwardingLogger was null"); 1184Assumed.NotEqual(_serviceState, LoggingServiceState.Shutdown, " The object is shutdown, should not do any operations on a shutdown component"); 1185Assumed.NotNull(forwardingLoggerSink, "forwardingLoggerSink was null"); 1186Assumed.NotNull(descriptions, "loggerDescriptions was null"); 1187Assumed.Positive(descriptions.Count, "loggerDescriptions was null"); 1239Assumed.NotNull(buildEvent, "buildEvent is null"); 1301Assumed.NotNull(buildEvent, "buildEvent is null"); 1373Assumed.True(_configCache.Value.HasConfiguration(projectStartedEventArgs.ProjectId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node."); 1596Assumed.NotNull(buildEventArgs, $"Unknown logging item in queue: {loggingEvent.GetType().FullName}"); 1981Assumed.True(projectFile != null || allowCacheMiss, $"ContextID {context.ProjectContextId} should have been in the ID-to-project file mapping but wasn't! Encountered during logging message: '{eventArgs.Message}'");
BackEnd\Components\Logging\LoggingServiceFactory.cs (1)
48Assumed.Equal(type, BuildComponentType.LoggingService, $"Cannot create components of type {type}");
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (31)
42Assumed.NotNullOrEmpty(messageResourceName, "Need resource string for comment message."); 114Assumed.NotNullOrEmpty(messageResourceName, "Need resource string for error message."); 139Assumed.NotNull(projectFile, $"ContextID {buildEventContext.ProjectContextId} should have been in the ID-to-project file mapping but wasn't!"); 157Assumed.NotNull(invalidProjectFileException, "Need exception context."); 158Assumed.NotNull(buildEventContext, "buildEventContext is null"); 179Assumed.NotNull(projectFile, $"ContextID {buildEventContext.ProjectContextId} should have been in the ID-to-project file mapping but wasn't!"); 211Assumed.NotNull(taskName, "Must specify the name of the task that failed."); 228Assumed.NotNullOrEmpty(messageResourceName, "Need resource string for error message."); 262Assumed.NotNullOrEmpty(taskName, "Must specify the name of the task that failed."); 287Assumed.NotNullOrEmpty(messageResourceName, "Need resource string for warning message."); 304Assumed.NotNull(file, "Must specify the associated file."); 305Assumed.NotNull(message, "Need warning message."); 306Assumed.NotNull(buildEventContext, "Need a BuildEventContext"); 331Assumed.NotNull(projectFile, $"ContextID {buildEventContext.ProjectContextId} should have been in the ID-to-project file mapping but wasn't!"); 525Assumed.NotNull(projectEvaluationEventContext, "projectBuildEventContext"); 601Assumed.NotNull(nodeBuildEventContext, "Need a nodeBuildEventContext"); 607Assumed.False(_projectFileMap.ContainsKey(projectContextId), $"ContextID {projectContextId} for project {projectFile} should not already be in the ID-to-file mapping!"); 616Assumed.Equal( 627Assumed.NotEqual( 638Assumed.NotNull(parentBuildEventContext, "Need a parentBuildEventContext"); 640Assumed.True(_configCache.Value.HasConfiguration(configurationId), "Cannot find the project configuration while injecting non-serialized data from out-of-proc node."); 672Assumed.NotNull(projectBuildEventContext, "projectBuildEventContext"); 686Assumed.True(_projectFileMap.TryRemove(projectBuildEventContext.ProjectContextId, out _), $"ContextID {projectBuildEventContext.ProjectContextId} for project {projectFile} should be in the ID-to-file mapping!"); 703Assumed.NotNull(projectBuildEventContext, "projectBuildEventContext is null"); 744Assumed.NotNull(targetBuildEventContext, "targetBuildEventContext is null"); 771Assumed.NotNull(taskBuildEventContext, "targetBuildEventContext is null"); 800Assumed.NotNull(targetBuildEventContext, "targetBuildEventContext is null"); 840Assumed.NotNull(taskBuildEventContext, "taskBuildEventContext is null"); 866Assumed.NotNull(eventName, "eventName is null"); 888Assumed.NotNull(buildEventContext, "buildEventContext was null"); 889Assumed.NotNull(filePath, "response file path was null");
BackEnd\Components\Logging\NodeLoggingContext.cs (4)
26Assumed.NotEqual(nodeId, BuildEventContext.InvalidNodeId, "Should not ever be given an invalid NodeId"); 49Assumed.True(this.IsValid, "Build not started."); 74Assumed.True(this.IsValid, "Build not started."); 86Assumed.True(this.IsValid, "Build not started.");
BackEnd\Components\Logging\ProjectLoggingContext.cs (2)
271Assumed.True(this.IsValid, "invalid"); 281Assumed.True(this.IsValid, "invalid");
BackEnd\Components\Logging\TaskLoggingContext.cs (1)
131Assumed.True(this.IsValid, "invalid");
BackEnd\Components\ProjectCache\CacheContext.cs (1)
43Assumed.True((graph != null) ^ (graphEntryPoints != null), "Either Graph is specified, or GraphEntryPoints is specified. Not both.");
BackEnd\Components\ProjectCache\CacheResult.cs (2)
63Assumed.True(buildResult != null ^ proxyTargets != null, "Either buildResult is specified, or proxyTargets is specified. Not both."); 96Assumed.NotEqual(resultType, CacheResultType.CacheHit, "CantBeCacheHit");
BackEnd\Components\ProjectCache\Experimental\CacheContext.cs (1)
45Assumed.True((graph != null) ^ (graphEntryPoints != null), "Either Graph is specified, or GraphEntryPoints is specified. Not both.");
BackEnd\Components\ProjectCache\Experimental\CacheResult.cs (2)
65Assumed.True(buildResult != null ^ proxyTargets != null, "Either buildResult is specified, or proxyTargets is specified. Not both."); 98Assumed.NotEqual(resultType, CacheResultType.CacheHit, "CantBeCacheHit");
BackEnd\Components\ProjectCache\Experimental\ProjectCacheException.cs (6)
21Assumed.Unreachable(); 31Assumed.NotNullOrEmpty(message, "Need error message."); 32Assumed.NotNullOrEmpty(errorCode, "Must specify the error message code."); 59Assumed.NotNull(messageResourceName, "Need error message."); 70Assumed.NotNull(messageResourceName, "Need error message."); 81Assumed.NotNull(messageResourceName, "Need error message.");
BackEnd\Components\ProjectCache\ProjectCacheException.cs (6)
20Assumed.Unreachable(); 30Assumed.NotNullOrEmpty(message, "Need error message."); 31Assumed.NotNullOrEmpty(errorCode, "Must specify the error message code."); 58Assumed.NotNull(messageResourceName, "Need error message."); 69Assumed.NotNull(messageResourceName, "Need error message."); 80Assumed.NotNull(messageResourceName, "Need error message.");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (6)
558Assumed.NotNull(submission.BuildRequestData, "Submission BuildRequestData is not populated."); 580Assumed.NotNull(buildRequest.ProjectInstance); 622Assumed.NotNull(plugin.PluginInstance, $"Plugin '{plugin.Name}' instance is null"); 767Assumed.NotNull(projectConfiguration.Attributes); 779Assumed.NotNull(projectPathAttribute, "Expected VS to set the project path on each ProjectConfiguration element."); 900Assumed.NotNull(plugin.PluginInstance, $"Plugin '{plugin.Name}' instance is null");
BackEnd\Components\RequestBuilder\BatchingEngine.cs (4)
112Assumed.NotNull(batchableObjectParameters, "Need the parameters of the batchable object to determine if it can be batched."); 113Assumed.NotNull(lookup, "Need to specify the lookup."); 304Assumed.Positive(itemListsToBeBatched.Count, "Need item types consumed by the batchable object."); 305Assumed.Positive(consumedMetadataReferences.Count, "Need item metadata consumed by the batchable object.");
BackEnd\Components\RequestBuilder\IntrinsicTasks\IntrinsicTaskFactory.cs (1)
49Assumed.Equal(taskName, TaskType.Name, StringComparison.OrdinalIgnoreCase, $"Unexpected task name {taskName}. Expected {TaskType.Name}");
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
252Assumed.Unreachable();
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (2)
175_ => Assumed.Unreachable<string>($"Unexpected case {_skipNonExistentProjects}"), 382Assumed.Equal(skipNonExistProjects, SkipNonExistentProjectsBehavior.Error, $"skipNonexistentProjects has unexpected value {skipNonExistProjects}");
BackEnd\Components\RequestBuilder\ItemBucket.cs (1)
82Assumed.NotNull(lookup, "Need lookup.");
BackEnd\Components\RequestBuilder\Lookup.cs (13)
104Assumed.NotNull(projectItems); 105Assumed.NotNull(properties); 265Assumed.GreaterThanOrEqual(_lookupScopes.Count, 2, "Too many calls to Leave()."); 266Assumed.True(Object.ReferenceEquals(scopeToLeave, _lookupScopes), $"Attempting to leave with scope '{scopeToLeave.Description}' but scope '{_lookupScopes.Description}' is on top of the stack."); 453Assumed.NotNullOrEmpty(name); 682Assumed.Null(existing, "Cannot add an itemgroup of this type."); 709Assumed.Null(_lookupScopes.ItemTypesToTruncateAtThisScope, "Cannot add an itemgroup of this type."); 918Assumed.False(_cloneTable.ContainsKey(cloneItem), "Should be new, not already in table!"); 1049Assumed.False(tableOfItemsOfSameType.Contains(item), "Item should not be in table"); 1064Assumed.False(tableOfItemsOfSameType.ContainsKey(item), "Item should not be in table"); 1095Assumed.NotNull(_lookupScopes.Parent, "Operation in outer scope not supported"); 1270Assumed.NotNull(value); 1328Assumed.NotEqual(modificationType, ModificationType.Update, "Modification type may only be update when a value is specified.");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (34)
204Assumed.NotNull(_componentHost, "Host not set."); 205Assumed.Null(_targetBuilder, "targetBuilder not null"); 206Assumed.Null(_nodeLoggingContext, "nodeLoggingContext not null"); 207Assumed.Null(_requestEntry, "requestEntry not null"); 208Assumed.False(_terminateEvent.WaitOne(0), "Cancel already called"); 228Assumed.True(HasActiveBuildRequest, "Request not building"); 229Assumed.False(_terminateEvent.WaitOne(0), "Request already terminated"); 230Assumed.False(_continueEvent.WaitOne(0), "Request already continued"); 234Assumed.True(_blockType == BlockType.BlockedOnTargetInProgress || _blockType == BlockType.Yielded || (_continueResults != null), $"Unexpected null results for request {_requestEntry.Request.GlobalRequestId} (nr {_requestEntry.Request.NodeRequestId})"); 245Assumed.True(HasActiveBuildRequest, "Request not building"); 246Assumed.False(_terminateEvent.WaitOne(0), "Request already terminated"); 247Assumed.False(_pendingResourceRequests.IsEmpty, "No pending resource requests"); 342Assumed.NotNull(_componentHost, "No host object set"); 343Assumed.Equal(projectFiles.Length, properties.Length, "Properties and project counts not the same"); 344Assumed.Equal(projectFiles.Length, toolsVersions.Length, "Tools versions and project counts not the same"); 388Assumed.Equal(requests.Length, results.Length, "# results != # requests"); 478Assumed.False(_inMSBuildCallback, "Already in an MSBuild callback!"); 488Assumed.True(_inMSBuildCallback, "Not in an MSBuild callback!"); 497Assumed.True(Monitor.IsEntered(monitorLockObject), "Not running under the given lock"); 558Assumed.Null(_componentHost, "RequestBuilder already initialized."); 634Assumed.Equal(type, BuildComponentType.RequestBuilder, $"Cannot create components of type {type}"); 643Assumed.Null(_requestTask, "Already have a task."); 685Assumed.NotEqual(_componentHost.LegacyThreadingData.MainThreadSubmissionId, _requestEntry.Request.SubmissionId, "Can't start builder thread when we are using legacy threading semantics for this request."); 750Assumed.Equal(_requestEntry.State, BuildRequestEntryState.Ready, $"Entry is not in the Ready state, it is in the {_requestEntry.State} state."); 758Assumed.Equal(_requestEntry.State, BuildRequestEntryState.Active, $"Entry is not in the Active state, it is in the {_requestEntry.State} state."); 766Assumed.True(_requestEntry.State is BuildRequestEntryState.Active or BuildRequestEntryState.Waiting, $"Entry is not in the Active or Waiting state, it is in the {_requestEntry.State} state."); 868Assumed.Null(result, "Result already set when exception was thrown."); 1004Assumed.Equal(requests.Length, results.Length, "# results != # requests"); 1022Assumed.False(isContinue, "Unexpected null results during continue"); 1132Assumed.NotNull(_targetBuilder, "Target builder is null"); 1241Assumed.Equal(_requestEntry.RequestConfiguration.ResultsNodeId, _componentHost.BuildParameters.NodeId, $"Results for configuration {_requestEntry.RequestConfiguration.ConfigurationId} were not retrieved from node {_requestEntry.RequestConfiguration.ResultsNodeId}"); 1451Assumed.NotNull(_requestEntry.RequestConfiguration.SavedCurrentDirectory, "Current directory not previously saved."); 1452Assumed.NotNull(_requestEntry.RequestConfiguration.SavedEnvironmentVariables, "Current environment not previously saved."); 1476Assumed.False(_isZombie, "RequestBuilder has been zombied.");
BackEnd\Components\RequestBuilder\TargetBuilder.cs (7)
115Assumed.Positive(targetNames.Length, "List of targets must be non-empty"); 116Assumed.NotNull(_componentHost, "InitializeComponent must be called before building targets."); 286Assumed.True(pushed, $"Failed to push any targets onto the stack. Target: {targets[i]} Current Target: {currentTargetEntry.Target.Name}"); 397Assumed.Equal(type, BuildComponentType.TargetBuilder, $"Cannot create components of type {type}"); 482Assumed.False(wasActivelyBuilding, $"Target {currentTargetEntry.Name} was actively building and waited on but we are attempting to build it again."); 545Assumed.Unreachable($"Unexpected target state {currentTargetEntry.State}"); 559Assumed.NotNull(targetResult);
BackEnd\Components\RequestBuilder\TargetEntry.cs (8)
422Assumed.False(_isExecuting, $"Target {_target.Name} is already executing"); 700Assumed.Null(_legacyCallTargetScopes, "We should have already left any legacy call target scopes."); 747Assumed.Null(_legacyCallTargetScopes, "We should have already left any legacy call target scopes."); 772Assumed.NotEqual(_state, TargetEntryState.Completed, $"State must not be Completed. State is {_state}."); 783Assumed.Equal(_state, TargetEntryState.Completed, $"State must be Completed. State is {_state}."); 784Assumed.Equal(_targetResult.ResultCode, TargetResultCode.Skipped, $"ResultCode must be Skipped. ResultCode is {_targetResult.ResultCode}."); 785Assumed.Equal(_targetResult.WorkUnitResult.ActionCode, WorkUnitActionCode.Continue, $"ActionCode must be Continue. ActionCode is {_targetResult.WorkUnitResult.ActionCode}."); 889Assumed.Equal(actual, expected, $"Expected state {expected}. Got {actual}");
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (19)
58Assumed.NotNull(project, "Need a project."); 59Assumed.NotNull(targetToAnalyze, "Need a target to analyze."); 93Assumed.NotNull(_targetInputSpecification, "targetInputSpecification is null"); 106Assumed.NotNull(_targetOutputSpecification, "targetOutputSpecification is null"); 205Assumed.Positive(itemVectorsReferencedInBothTargetInputsAndOutputs.Count, "The target must have inputs."); 206Assumed.False(IsItemVectorEmpty(itemVectorsInTargetInputs), "The target must have inputs."); 610Assumed.Equal(inputItemVectors.Count, 1, "There should only be one item vector of a particular type in the target inputs that can be filtered."); 713Assumed.LessThanOrEqual(numberOfInputItemVectorsWithAllChangedItems, itemVectorsReferencedInBothTargetInputsAndOutputs.Count, "The number of vectors containing all changed items cannot exceed the number of correlated vectors."); 718Assumed.Equal(result, DependencyAnalysisResult.IncrementalBuild, "If inputs have changed, this must be an incremental build."); 846Assumed.False(itemVectorPartition.ContainsKey(item), $"ItemVectorPartition already contains a vector for items with the expression '{item}'"); 849Assumed.True((itemVectorTransforms == null) || (itemVectorCollection.Equals(itemVectorTransforms)) || (itemVectorPartition.Count == 1), "If transforms have been separated out, there should only be one item vector per partition."); 959Assumed.Positive(inputs.Count, "Need to specify inputs."); 960Assumed.Positive(outputs.Count, "Need to specify outputs."); 963Assumed.True(inputs[0] is string or ProjectItemInstance, "Must be either string or ProjectItemInstance"); 968Assumed.True(outputs[0] is string or ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1083Assumed.True(inputs[0] is string or ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1088Assumed.True(outputs[0] is string or ProjectItemInstance, "Must be either string or ProjectItemInstance"); 1196Assumed.NotNullOrEmpty(path1); 1197Assumed.NotNullOrEmpty(path2);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (8)
155Assumed.NotNull(taskInstance, "Need to specify the task instance."); 226Assumed.NotNull(_taskExecutionHost, "taskExecutionHost not initialized."); 243Assumed.Equal(type, BuildComponentType.TaskBuilder, $"Cannot create components of type {type}"); 527Assumed.Equal(howToExecuteTask, TaskExecutionMode.InferOutputsOnly, "should be inferring"); 529Assumed.True(GatherTaskOutputs(null, howToExecuteTask, bucket), "The method GatherTaskOutputs() should never fail when inferring task outputs."); 555Assumed.NotNull(_taskNode); // taskNode should never be null when we're calling this method. 978Assumed.Unreachable(); 1187Assumed.Equal(howToExecuteTask, TaskExecutionMode.InferOutputsOnly, "should be inferring");
BackEnd\Components\RequestBuilder\TaskHost.cs (8)
121Assumed.NotNull(taskLocation); 301Assumed.Equal(targetOutputsPerProject.Length, result.TargetOutputsPerProject.Count, $"{targetOutputsPerProject.Length} != {result.TargetOutputsPerProject.Count}"); 361Assumed.Equal(_yieldThreadId, -1, "Cannot call Yield() while yielding."); 390Assumed.NotEqual(_yieldThreadId, -1, "Cannot call Reacquire() before Yield()."); 391Assumed.Equal(_yieldThreadId, Environment.CurrentManagedThreadId, $"Cannot call Reacquire() on thread {Environment.CurrentManagedThreadId} when Yield() was called on thread {_yieldThreadId}"); 1218Assumed.Equal(results.Length, projectFileNames.Length, $"{results.Length}!={projectFileNames.Length}."); 1263Assumed.True(results.Length == projectFileNames.Length || !overallSuccess, $"The number of results returned {results.Length} cannot be less than the number of project files {projectFileNames.Length} unless one of the results indicated failure."); 1278Assumed.True(_activeProxy, "Attempted to use an inactive task host.");
BackEnd\Components\Scheduler\SchedulableRequest.cs (18)
130Assumed.True((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection."); 255Assumed.Equal(_creationTime, DateTime.MinValue, "Cannot set CreationTime twice."); 272Assumed.Equal(_startTime, DateTime.MinValue, "Cannot set StartTime twice."); 289Assumed.Equal(_endTime, DateTime.MinValue, "Cannot set EndTime twice."); 339Assumed.Null(BlockingTarget, "Cannot block again if we're already blocked on a target"); 344Assumed.False(_requestsWeAreBlockedBy.ContainsKey(key), "We are already blocked by this request."); 345Assumed.False(blockingRequest._requestsWeAreBlocking.Contains(this), "The blocking request thinks it is already blocking us."); 400Assumed.True(_assignedNodeId == Scheduler.InvalidNodeId || _assignedNodeId == nodeId, "Request must always resume on the same node on which it was started."); 403Assumed.True((_state == SchedulableRequestState.Ready) || !_schedulingData.IsRequestScheduled(this), $"Another instance of request {_request.GlobalRequestId} is already scheduled."); 404Assumed.False(_schedulingData.IsNodeWorking(nodeId), $"Cannot resume execution of request {_request.GlobalRequestId} because node {nodeId} is already working."); 407Assumed.True(requiredNodeId == Scheduler.InvalidNodeId || requiredNodeId == nodeId, $"Request {_request.GlobalRequestId} cannot be assigned to node {nodeId} because its configuration is already assigned to node {requiredNodeId}"); 419Assumed.True(_state != SchedulableRequestState.Ready || result.CircularDependency, "Request can only be Completed from the Ready state if the result indicates a circular dependency occurred."); 420Assumed.Zero(_requestsWeAreBlockedBy.Count, "We can't be complete if we are still blocked on requests."); 438Assumed.Zero(_requestsWeAreBlockedBy.Count, "We are blocked by requests."); 439Assumed.Zero(_requestsWeAreBlocking.Count, "We are blocking by requests."); 448Assumed.Equal(_state, requiredState, $"Request {_request.GlobalRequestId} expected to be in state {requiredState} but state is actually {_state}"); 640Assumed.True(_requestsWeAreBlockedBy.TryGetValue(blockingRequestKey, out SchedulableRequest unblockingRequest), "We are not blocked by the specified request."); 641Assumed.True(unblockingRequest._requestsWeAreBlocking.Contains(this), "The request unblocking us doesn't think it is blocking us.");
BackEnd\Components\Scheduler\Scheduler.cs (23)
374Assumed.True(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target"); 379Assumed.True(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target"); 388Assumed.NotNullOrEmpty(blocker.BlockingTarget, "Blocking target should exist"); 400Assumed.True(string.IsNullOrEmpty(blocker.BlockingTarget), "Blocking target should be null because this is not a request blocking on a target"); 446Assumed.Equal(result.ParentGlobalRequestId, request.Parent.BuildRequest.GlobalRequestId, "Result's parent doesn't match request's parent."); 564Assumed.Unreachable(); 710Assumed.Equal(componentType, BuildComponentType.Scheduler, $"Cannot create components of type {componentType}"); 817Assumed.Unreachable($"Somehow no requests are currently executing, and at least one of the {_schedulingData.BlockedRequestsCount} requests blocked by in-progress requests is servicable by a currently existing node, but no circular dependency was detected ..."); 824Assumed.Unreachable($"None of the {_schedulingData.BlockedRequestsCount} blocked requests can be serviced by currently existing nodes, but we aren't requesting a new one."); 830Assumed.Unreachable($"Somehow we have {_schedulingData.ReadyRequestsCount} requests which are ready to go but we didn't tell the nodes to continue."); 835Assumed.Unreachable($"Somehow we have {_schedulingData.UnscheduledRequestsCount} unassigned build requests but {idleNodes.Count} of our nodes are free and we aren't requesting a new one..."); 840Assumed.Positive(responses.Count, "We failed to request a node to be created."); 1426Assumed.NotEqual(nodeId, InvalidNodeId, "Invalid node id specified."); 1441Assumed.NotEqual(config.ResultsNodeId, InvalidNodeId, "Configuration's results node is not set."); 1454Assumed.True(_componentHost.BuildParameters.DisableInProcNode || ForceAffinityOutOfProc, "Proxy requests should only get scheduled to out of proc nodes when the inproc node is disabled"); 1608Assumed.Unreachable(); 1630Assumed.Equal(inProcNodesToCreate, 1, "We should not be trying to create more than one inproc node"); 1835Assumed.True(_configCache.HasConfiguration(request.ConfigurationId), "A request should have a configuration if it makes it this far in the build process."); 1922Assumed.Null(request.Parent, "Unexpectedly generated a SubmissionComplete response for a request which is not top-level."); 2121Assumed.True(configCache.HasConfiguration(configurationId), "All non root requests should have a parent with a loaded configuration"); 2194Assumed.NotEqual(parentRequestNode, InvalidNodeId, "Invalid parent node provided."); 2197Assumed.Equal(result.ParentGlobalRequestId, requestWhichGeneratedResult.ParentGlobalRequestId, "Result's parent doesn't match request's parent."); 2252Assumed.NotEqual(request.ConfigurationId, BuildRequestConfiguration.InvalidConfigurationId, "Requests should have a valid configuration id at this point");
BackEnd\Components\Scheduler\ScheduleTimeRecord.cs (1)
57Assumed.Equal(_startTimeForCurrentState, DateTime.MinValue, "Cannot start the counter when it is already running.");
BackEnd\Components\Scheduler\SchedulingData.cs (14)
280Assumed.True(_buildHierarchy.ContainsKey(parent), $"Parent doesn't exist in build hierarchy for request {request.BuildRequest.GlobalRequestId}"); 332Assumed.False(requestsAssignedToNode.Contains(request), $"Request {request.BuildRequest.GlobalRequestId} is already scheduled to node {request.AssignedNode}"); 356Assumed.False(_blockedRequests.ContainsKey(request.BuildRequest.GlobalRequestId), $"Request with global id {request.BuildRequest.GlobalRequestId} is already blocked!"); 361Assumed.False(_yieldingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), $"Request with global id {request.BuildRequest.GlobalRequestId} is already yielded!"); 366Assumed.True(_configurationToRequests.ContainsKey(request.BuildRequest.ConfigurationId), $"Configuration {request.BuildRequest.ConfigurationId} never had requests assigned to it."); 367Assumed.Positive(_configurationToRequests[request.BuildRequest.ConfigurationId].Count, $"Configuration {request.BuildRequest.ConfigurationId} has no requests assigned to it."); 378Assumed.False(_executingRequests.ContainsKey(request.BuildRequest.GlobalRequestId), $"Request with global id {request.BuildRequest.GlobalRequestId} is already executing!"); 379Assumed.True(!_executingRequestByNode.ContainsKey(request.AssignedNode) || _executingRequestByNode[request.AssignedNode] == null, $"Node {request.AssignedNode} is currently executing a request."); 392Assumed.False(_readyRequests.ContainsKey(request.BuildRequest.GlobalRequestId), $"Request with global id {request.BuildRequest.GlobalRequestId} is already ready!"); 401Assumed.False(readyRequestsOnNode.Contains(request), $"Request with global id {request.BuildRequest.GlobalRequestId} is already marked as ready on node {request.AssignedNode}"); 406Assumed.Unreachable($"Request with global id {request.BuildRequest.GlobalRequestId} cannot transition to the Unscheduled state"); 491Assumed.NotNull(returnValue, $"Global Request Id {globalRequestId} has not been assigned and cannot be retrieved."); 682Assumed.Zero(GetRequestsAssignedToConfigurationCount(configurationId), $"Configuration with ID {configurationId} cannot be unassigned from a node, because there are requests scheduled with that configuration."); 723Assumed.NotNull(request, $"Request {globalRequestId} was expected to be in state {state} but is not scheduled at all (it may be unscheduled or may be unknown to the system.)");
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (4)
101Assumed.NotNull(sdk); 102Assumed.NotNull(loggingContext); 103Assumed.NotNull(sdkReferenceLocation); 104Assumed.NotNullOrEmpty(projectPath);
BackEnd\Node\ServerNodeBuildCommand.cs (1)
80Assumed.NotNull(consoleConfiguration);
BackEnd\Shared\BuildRequest.cs (4)
267Assumed.Equal(_globalRequestId, InvalidGlobalRequestId, "Global Request ID cannot be set twice."); 350Assumed.Equal(_buildEventContext, BuildEventContext.Invalid, "The build event context is already set."); 413Assumed.False(IsConfigurationResolved, "Configuration already resolved"); 415Assumed.True(IsConfigurationResolved, "Configuration not resolved");
BackEnd\Shared\BuildRequestConfiguration.cs (20)
178Assumed.NotNullOrEmpty(data.ProjectFullPath); 241Assumed.NotEqual(configId, InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor."); 243Assumed.Null(other._transferredState, "Unexpected transferred state still set on other configuration."); 372Assumed.True((_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 {_configId}, the new value was {value}."); 403Assumed.False(IsCached, "We shouldn't be accessing the ProjectInstance when the configuration is cached."); 415Assumed.Null(_transferredProperties, "Shouldn't be transferring entire state of ProjectInstance when transferredProperties is not null."); 435Assumed.NotNull(project, "Cannot set null project."); 465Assumed.False(IsLoaded, $"Already loaded the project for this configuration id {ConfigurationId}."); 542Assumed.True(IsLoaded, $"This {nameof(BuildRequestConfiguration)} must be loaded at the end of this method"); 569Assumed.Null(_projectInitialTargets, "Initial targets cannot be reset once they have been set."); 585Assumed.Null(_projectDefaultTargets, "Default targets cannot be reset once they have been set."); 600Assumed.Null(_projectTargets, "Targets cannot be reset once set."); 617Assumed.False(IsCached, "Configuration is cached, we shouldn't be accessing the lookup."); 794Assumed.Equal(request.ConfigurationId, ConfigurationId, "Request does not match configuration."); 795Assumed.NotNull(_projectInitialTargets, "Initial targets have not been set."); 796Assumed.NotNull(_projectDefaultTargets, "Default targets have not been set."); 800Assumed.True(CollectionHelpers.SetEquivalent(request.Targets, request.ProxyTargets.ProxyTargetToRealTargetMap.Keys), "Targets must be same as proxy targets"); 836Assumed.NotNull(Project); 837Assumed.NotNullOrEmpty(referenceFullPath); 838Assumed.True(Path.IsPathRooted(referenceFullPath), "Method does not treat path normalization cases");
BackEnd\Shared\BuildResult.cs (3)
554Assumed.Equal(targetResult.ResultCode, TargetResultCode.Skipped, $"Items already exist for target {target}."); 566Assumed.Positive(targetsToKeep.Count, $"{nameof(targetsToKeep)} should contain at least one target."); 584Assumed.Equal(results.ConfigurationId, ConfigurationId, "Result configurations don't match");
BackEnd\Shared\EventsCreatorHelper.cs (8)
14Assumed.NotNull(buildEventContext); 15Assumed.NotNull(message); 31Assumed.NotNull(buildEventContext); 32Assumed.NotNull(file); 33Assumed.NotNull(message); 62Assumed.NotNull(buildEventContext); 63Assumed.NotNull(file); 64Assumed.NotNull(message);
BackEnd\Shared\TargetResult.cs (1)
386Assumed.NotNull(buffer, "Unexpected null items buffer during translation.");
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (5)
487Assumed.NotNull(_taskFactoryWrapper, "Need a taskFactoryWrapper to retrieve outputs from."); 625Assumed.Null(TaskInstance, "Task Instance should be null"); 1365Assumed.NotNull(parameterValue, "Didn't expect null parameterValue in InitializeTaskVectorParameter"); 1736Assumed.NotNull(_taskFactoryWrapper, "Expected taskFactoryWrapper to not be null"); 1814Assumed.NotNullOrEmpty(resolvedAssemblyLocation, $"IOutOfProcTaskFactory {_taskFactoryWrapper.TaskFactory.FactoryName} created a task but returned null/empty assembly path");
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
36Assumed.Equal(type, BuildComponentType.BuildCheckManagerProvider, $"Cannot create components of type {type}"); 42Assumed.NotNull(host, "BuildComponentHost was null");
BuildCheck\Infrastructure\CheckContext\CheckDispatchingContext.cs (2)
32Assumed.NotNull(buildEvent); 39Assumed.NotNullOrEmpty(messageResourceName);
Collections\ConcurrentQueueExtensions.cs (1)
21Assumed.True(stack.TryDequeue(out T result), "Unable to dequeue from queue");
Collections\ConcurrentStackExtensions.cs (2)
21Assumed.True(stack.TryPeek(out T result), "Unable to peek from stack"); 31Assumed.True(stack.TryPop(out T result), "Unable to pop from stack");
Collections\CopyOnWritePropertyDictionary.cs (5)
105Assumed.NotNull(value, "Properties can't have null value"); 106Assumed.Equal(name, value.Key, StringComparison.OrdinalIgnoreCase, "Key must match value's key"); 256Assumed.NotNull(value, "Properties can't have null value"); 257Assumed.Equal(key, value.Key, "Key must match value's key"); 307Assumed.Equal(item.Key, item.Value.Key, "Key must match value's key");
Collections\ItemDictionary.cs (1)
338Assumed.Equal(itemType, list[i].Key, StringComparison.OrdinalIgnoreCase, "Item type mismatch");
Collections\MultiDictionary.cs (2)
119Assumed.NotNull(value, "Null value not allowed"); 139Assumed.NotNull(value, "Null value not allowed");
Collections\PropertyDictionary.cs (4)
201Assumed.NotNull(value, "Properties can't have null value"); 202Assumed.Equal(name, value.Key, StringComparison.OrdinalIgnoreCase, "Key must match value's key"); 363Assumed.Equal(key, value.Key, "Key must match value's key"); 445Assumed.Equal(item.Key, item.Value.Key, "Key must match value's key");
Collections\ReadOnlyConvertingDictionary.cs (1)
150Assumed.GreaterThanOrEqual(array.Length - arrayIndex, _backing.Count, "Specified array size insufficient to hold the contents of the collection.");
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (1)
121Assumed.NotNull(comparer, "use explicit comparer");
Collections\WeakValueDictionary.cs (1)
104Assumed.Unreachable();
Construction\ProjectChooseElement.cs (1)
90Assumed.Null(containingProject.Link, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectElement.cs (4)
167Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 264Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 620Assumed.NotNull(containingProject); 633=> Assumed.Unreachable();
Construction\ProjectElementContainer.cs (15)
176Assumed.Equal(child.NextSibling.PreviousSibling, reference, "Invalid structure"); 232Assumed.Equal(child.PreviousSibling.NextSibling, reference, "Invalid structure"); 256Assumed.NotNull(FirstChild, "Invalid structure"); 275Assumed.NotNull(LastChild, "Invalid structure"); 389Assumed.Equal(child.Parent, this, "Expected parent already set"); 390Assumed.True(child.PreviousSibling == null && child.NextSibling == null, "Invalid structure"); 391Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 441Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 458Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 474Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 494Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 609Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 651Assumed.True(FirstChild == null && LastChild == null, "Expecting no children"); 692Assumed.True(child.NextSibling == null || child.NextSibling.PreviousSibling != this, "Invalid structure"); 693Assumed.True(child.PreviousSibling == null || child.PreviousSibling.NextSibling != this, "Invalid structure");
Construction\ProjectRootElement.cs (3)
1779Assumed.Null(document.FullPath, "Only virtual documents supported"); 1818Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed."); 1880Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectTaskElement.cs (1)
215Assumed.Null(Link, "Attempt to edit a document that is not backed by a local xml is disallowed.");
Construction\ProjectUsingTaskBodyElement.cs (1)
161Assumed.Null(parentUsingTask.Link, "TaskFactory");
Construction\Solution\ProjectInSolution.cs (1)
509Assumed.NotNull(projectName, "Null strings not allowed.");
Construction\Solution\SolutionFile.cs (9)
351Assumed.NotNullOrEmpty(_solutionFile, "ReadSolutionModel() got a null or empty solution file."); 538Assumed.NotNullOrEmpty(solutionFile, "null solution file passed to GetSolutionFileMajorVersion!"); 709Assumed.NotNull(SolutionReader, "ParseFileHeader(): reader is null!"); 735Assumed.NotNullOrEmpty(_solutionFile, "ParseSolutionFile() got a null solution file!"); 939Assumed.NotNull(SolutionReader, "ParseFileHeader(): reader is null!"); 1004Assumed.NotNull(versionString, "ValidateSolutionFileVersion() got a null line!"); 1048Assumed.NotNullOrEmpty(firstLine, "ParseProject() got a null firstLine!"); 1049Assumed.NotNull(SolutionReader, "ParseProject() got a null reader!"); 1302Assumed.NotNull(proj.RelativePath, "Project relative path cannot be null.");
Construction\UsingTaskParameterGroupElement.cs (1)
129Assumed.Null(parentUsingTask.Link, "TaskFactory");
Definition\Project.cs (14)
1803Assumed.False(implementationInternal.IsZombified, "OM_ProjectIsNoLongerActive"); 1814Assumed.NotNull(otherXml); 2453_ => Assumed.Unreachable<bool>(), 2849Assumed.Unreachable(); 3566Assumed.Null(_data.Expander.Metadata, "Should be null"); 3593Assumed.NotNull(otherXml); 3745Assumed.NotEqual(LastEvaluationId, BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 3766Assumed.False(IsDirty, "Should not be dirty now"); 3813Assumed.Equal(LastEvaluationId, BuildEventContext.InvalidEvaluationId, "This is the first evaluation therefore the last evaluation id is invalid"); 3817Assumed.NotEqual(LastEvaluationId, BuildEventContext.InvalidEvaluationId, "Last evaluation ID must be valid after the first evaluation"); 4402Assumed.NotNull(property); 4414Assumed.NotNull(itemDefinitionMetadatum); 4426Assumed.NotNull(item); 4570=> Assumed.Unreachable<bool>();
Definition\ProjectCollection.cs (1)
547Assumed.NotNull(_defaultToolsVersion, "Should have a default");
Definition\ProjectItem.cs (3)
130Assumed.NotNull(project); 1008Assumed.NotNull(_xml); 1032Assumed.NotNull(_xml);
Definition\ProjectItemDefinition.cs (1)
58Assumed.NotNull(project);
Definition\ProjectProperty.cs (1)
606Assumed.Unreachable();
Definition\ResolvedImport.cs (2)
23Assumed.NotNull(importedProject, valueExpression: "child"); 37Assumed.NotNull(importedProject, valueExpression: "child");
Definition\Toolset.cs (2)
297Assumed.NotNull(getFiles); 298Assumed.NotNull(loadXmlFromPath);
Definition\ToolsetPropertyDefinition.cs (1)
73Assumed.NotNull(value, valueExpression: "Value");
Definition\ToolsetReader.cs (1)
302Assumed.Equal(Constants.defaultToolsVersion, "2.0", "Getting 2.0 FX path so default should be 2.0");
ElementLocation\ElementLocation.cs (7)
143Assumed.Equal(translator.Mode, TranslationDirection.WriteToStream, "write only"); 255Assumed.PositiveOrZero(line, "Use zero for unknown"); 256Assumed.PositiveOrZero(column, "Use zero for unknown"); 331Assumed.PositiveOrZero(line, "Use zero for unknown"); 332Assumed.PositiveOrZero(column, "Use zero for unknown"); 333Assumed.LessThanOrEqual(line, 65535, "Use ElementLocation instead"); 334Assumed.LessThanOrEqual(column, 65535, "Use ElementLocation instead");
ElementLocation\RegistryLocation.cs (1)
33Assumed.NotNullOrEmpty(registryPath);
ElementLocation\XmlDocumentWithLocation.cs (1)
361Assumed.True(Path.IsPathRooted(fullPath), "should be full path");
Errors\InternalLoggerException.cs (5)
92Assumed.NotNullOrEmpty(message, "Need error message."); 93Assumed.True(innerException != null || initializationException, "Need the logger exception."); 94Assumed.NotNullOrEmpty(errorCode, "Must specify the error message code."); 95Assumed.NotNullOrEmpty(helpKeyword, "Must specify the help keyword for the IDE."); 247Assumed.NotNull(messageResourceName, "Need error message.");
Evaluation\Conditionals\NumericExpressionNode.cs (1)
20Assumed.NotNullOrEmpty(value, "NumericExpressionNode cannot have empty value");
Evaluation\Conditionals\Parser.cs (1)
102Assumed.True((optionSettings & ParserOptions.AllowProperties) != 0, "Properties should always be allowed.");
Evaluation\Conditionals\Scanner.cs (1)
63Assumed.True((options & ParserOptions.AllowProperties) != 0, "Properties should always be allowed.");
Evaluation\Conditionals\Token.cs (3)
92Assumed.True( 101Assumed.NotNull(tokenString); 144_ => Assumed.Unreachable<string>(),
Evaluation\Context\EvaluationContext.cs (1)
133return Assumed.Unreachable<EvaluationContext>();
Evaluation\Evaluator.cs (8)
221Assumed.NotNull(data); 222Assumed.NotNull(projectRootElementCache); 223Assumed.NotNull(evaluationContext); 224Assumed.NotNull(loggingService); 225Assumed.NotNull(buildEventContext); 632Assumed.Equal(_data.EvaluationId, BuildEventContext.InvalidEvaluationId, "There is no prior evaluation ID. The evaluator data needs to be reset at this point"); 660Assumed.NotEqual(_data.EvaluationId, BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 834Assumed.True(_evaluationProfiler.IsEmpty(), "Evaluation profiler stack is not empty.");
Evaluation\Expander.cs (15)
499Assumed.NotNull(elementLocation); 520Assumed.NotNull(elementLocation); 534Assumed.True((options & ExpanderOptions.BreakOnNotEmpty) == 0, "not supported"); 568Assumed.NotNull(elementLocation); 642Assumed.NotNull(elementLocation); 983Assumed.NotNull(metadata, "Cannot expand metadata without providing metadata"); 1153Assumed.NotEqual(options, ExpanderOptions.Invalid, "Must be expanding metadata of some kind"); 1161Assumed.True(itemMetadataMatch.Success, "Need a valid item metadata."); 1285Assumed.NotNull(properties, "Cannot expand properties without providing properties"); 2122Assumed.False(matchesEnumerator.MoveNext(), "Expected just one item vector"); 2133Assumed.NotNull(items, "Cannot expand items without providing items"); 2251Assumed.NotNull(evaluatedItems, "Cannot expand items without providing items"); 2334Assumed.NotNull(items, "Cannot expand items without providing items"); 4309Assumed.True(cachedTypeInformation.Item1 != null || cachedTypeInformation.Item2 != null, "Function type information needs either string or type represented."); 4327Assumed.NotNull(receiverType, $"Type information for {typeName} was present in the allowlist cache as {assemblyQualifiedTypeName} but the type could not be loaded.");
Evaluation\Expander\WellKnownFunctions.cs (1)
955Assumed.NotNull(loggingContext, $"The logging context is missed. {nameof(IntrinsicFunctions.RegisterBuildCheck)} can not be invoked.");
Evaluation\ItemSpec.cs (1)
411Assumed.Unreachable();
Evaluation\LazyItemEvaluator.cs (1)
524Assumed.Unreachable();
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
126Assumed.Equal(capturedItems.Comparer, StringComparer.OrdinalIgnoreCase, "MSBuild assumes case insensitive item name comparison");
Evaluation\ProjectParser.cs (2)
99Assumed.NotNull(project); 100Assumed.NotNull(document);
Evaluation\ProjectRootElementCache.cs (6)
106Assumed.Equal(s_getEntriesNumber, 1, "Reentrance to the ProjectRootElementCache.Get function detected."); 253Assumed.False(System.Threading.Monitor.IsEntered(_locker), "Detected lock ordering inversion in ProjectRootElementCache."); 344Assumed.NotNull(projectRootElement); 345Assumed.Equal(projectRootElement.FullPath, projectFile, StringComparison.OrdinalIgnoreCase, $"Got project back with incorrect path. Expected path: {projectFile}, received path: {projectRootElement.FullPath}."); 529Assumed.NotNull(projectRootElement.FullPath); 534Assumed.Equal(_weakCache[oldFullPathIfAny], projectRootElement, "Should already be present");
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (2)
46Assumed.NotNull(dataToWrap); 47Assumed.NotNull(evaluationLoggingContext);
Evaluation\SimpleProjectRootElementCache.cs (3)
65Assumed.NotNull(rootElement); 66Assumed.Equal(rootElement.FullPath, key, StringComparison.OrdinalIgnoreCase, $"Got project back with incorrect path. Expected path: {key}, received path: {rootElement.FullPath}."); 70Assumed.True(_cache.TryGetValue(key, out _), "Project should have been added into cache and boosted");
Graph\GraphBuilder.cs (5)
231Assumed.True(projectsByPath.TryGetValue(referencingProjectPath, out var referencingNodes), "nodes should include solution projects"); 236Assumed.True(projectsByPath.TryGetValue(referencedProjectPath, out List<ProjectGraphNode> projectToReturn), "nodes should include solution projects"); 463Assumed.Equal(state, NodeVisitationState.Processed, "entrypoints should get processed after a call to detect cycles"); 701Assumed.True(ReferenceItems.TryGetValue(key, out ProjectItemInstance referenceItem), "All requested keys should exist"); 746Assumed.True(ReferenceItems.TryRemove(key, out _), "All requested keys should exist");
Graph\GraphBuildSubmission.cs (2)
56Assumed.NotNull(BuildResult, "BuildResult is not populated after Execute is done."); 63Assumed.Equal(result.SubmissionId, SubmissionId, "GraphBuildResult's submission id doesn't match GraphBuildSubmission's");
Graph\ProjectGraph.cs (1)
587Assumed.Equal(toposort.Count, graphNodes.Count, "sorted node count must be equal to total node count");
Graph\ProjectGraphNode.cs (2)
27Assumed.NotNull(projectInstance); 76Assumed.True(reference._referencingProjects.Contains(this), "references should point to the nodes referencing them");
Graph\ProjectInterpretation.cs (6)
64Assumed.True(!skipIfNonexistent || (!target.Equals(MSBuildConstants.DefaultTargetsMarker) 229Assumed.False((isOuterBuild && isInnerBuild), $"A project cannot be an outer and inner build at the same time: ${project.FullPath}"); 264Assumed.True(graphBuilder.Edges[(outerBuildReferencingProject, innerBuild)] 284Assumed.False(string.IsNullOrWhiteSpace(globalPropertyName), "Must have an inner build property"); 285Assumed.False(string.IsNullOrWhiteSpace(globalPropertyValues), "Must have values for the inner build property"); 381Assumed.NotNull(projectReference);
Instance\ProjectInstance.cs (18)
378Assumed.NotNull(project); 431Assumed.NotNull(linkedProject); 675Assumed.NotNull(data); 676Assumed.NotNullOrEmpty(directory); 741Assumed.True(filter == null || isImmutable, "The result of a filtered ProjectInstance clone must be immutable."); 1555=> Assumed.Unreachable<Dictionary<string, List<string>>>(); 1811=> Assumed.Unreachable(); 1836=> Assumed.Unreachable(); 1848=> Assumed.Unreachable(); 1860=> Assumed.Unreachable(); 2441Assumed.Null(ProjectRootElementCache, $"{nameof(ProjectRootElementCache)} is already set. Cannot set again"); 2442Assumed.Null(_hostServices, $"{nameof(HostServices)} is already set. Cannot set again"); 2443Assumed.NotNull(TaskRegistry, $"{nameof(TaskRegistry)} Cannot be null after {nameof(ProjectInstance)} object creation."); 2639Assumed.True(FileUtilities.IsSolutionFilename(projectFile), $"Project file {projectFile} is not a solution."); 2916Assumed.NotNullOrEmpty(targetName); 2917Assumed.False(_actualTargets.ContainsKey(targetName), $"Target {targetName} already exists."); 3272Assumed.Equal(EvaluationId, BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation"); 3295Assumed.NotEqual(EvaluationId, BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
Instance\ProjectItemGroupTaskInstance.cs (3)
52Assumed.NotNull(condition); 53Assumed.NotNull(location); 54Assumed.NotNull(items);
Instance\ProjectItemGroupTaskItemInstance.cs (9)
161Assumed.NotNull(itemType); 162Assumed.NotNull(include); 163Assumed.NotNull(exclude); 164Assumed.NotNull(remove); 165Assumed.NotNull(keepMetadata); 166Assumed.NotNull(removeMetadata); 167Assumed.NotNull(keepDuplicates); 168Assumed.NotNull(condition); 169Assumed.NotNull(location);
Instance\ProjectItemGroupTaskMetadataInstance.cs (4)
49Assumed.NotNull(name); 50Assumed.NotNull(value); 51Assumed.NotNull(condition); 52Assumed.NotNull(location);
Instance\ProjectItemInstance.cs (8)
1397=> Assumed.Unreachable<ProjectMetadataInstance>(); 1403=> Assumed.Unreachable<ProjectMetadataInstance>(); 2229Assumed.NotNullOrEmpty(itemType); 2259Assumed.NotNullOrEmpty(ItemType); 2292Assumed.NotNullOrEmpty(ItemType); 2321Assumed.NotNullOrEmpty(ItemType); 2322Assumed.NotNull(source); 2471Assumed.Unreachable();
Instance\ProjectMetadataInstance.cs (1)
179Assumed.Equal(translator.Mode, TranslationDirection.WriteToStream, "write only");
Instance\ProjectOnErrorInstance.cs (3)
57Assumed.NotNullOrEmpty(executeTargets); 58Assumed.NotNull(condition); 59Assumed.NotNull(location);
Instance\ProjectPropertyGroupTaskInstance.cs (3)
52Assumed.NotNull(condition); 53Assumed.NotNull(location); 54Assumed.NotNull(properties);
Instance\ProjectPropertyGroupTaskPropertyInstance.cs (4)
49Assumed.NotNull(name); 50Assumed.NotNull(value); 51Assumed.NotNull(condition); 52Assumed.NotNull(location);
Instance\ProjectPropertyInstance.cs (2)
174Assumed.Equal(translator.Mode, TranslationDirection.WriteToStream, "write only"); 273Assumed.Equal(translator.Mode, TranslationDirection.ReadFromStream, "read only");
Instance\ProjectTargetInstance.cs (12)
164Assumed.NotNullOrEmpty(name); 165Assumed.NotNull(condition); 166Assumed.NotNull(inputs); 167Assumed.NotNull(outputs); 168Assumed.NotNull(keepDuplicateOutputs); 169Assumed.NotNull(dependsOnTargets); 170Assumed.NotNull(beforeTargets); 171Assumed.NotNull(afterTargets); 172Assumed.NotNull(location); 173Assumed.NotNull(children); 174Assumed.NotNull(onErrorChildren); 543Assumed.NotNullOrEmpty(taskName);
Instance\ProjectTargetInstanceChild.cs (1)
44=> Assumed.Unreachable();
Instance\ProjectTaskInstance.cs (2)
100Assumed.NotNull(element); 101Assumed.NotNull(outputs);
Instance\ProjectTaskInstanceChild.cs (1)
49=> Assumed.Unreachable();
Instance\ProjectTaskOutputItemInstance.cs (5)
59Assumed.NotNullOrEmpty(itemType); 60Assumed.NotNullOrEmpty(taskParameter); 61Assumed.NotNull(location); 62Assumed.NotNull(itemTypeLocation); 63Assumed.NotNull(taskParameterLocation);
Instance\ProjectTaskOutputPropertyInstance.cs (5)
59Assumed.NotNullOrEmpty(propertyName); 60Assumed.NotNullOrEmpty(taskParameter); 61Assumed.NotNull(location); 62Assumed.NotNull(propertyNameLocation); 63Assumed.NotNull(taskParameterLocation);
Instance\TaskFactories\AssemblyTaskFactory.cs (1)
360Assumed.NotNull(buildComponentHost);
Instance\TaskFactories\TaskHostTask.cs (4)
178Assumed.NotNull(taskType); 179Assumed.NotNull(taskEnvironment); 318Assumed.NotNull(_taskHostProvider); 572Assumed.Unreachable();
Instance\TaskFactoryEngineContext.cs (2)
75Assumed.NotNull(elementLocation); 404Assumed.True(_activeProxy, "Attempted to use an inactive task factory logging host.");
Instance\TaskRegistry.cs (10)
175Assumed.NotNull(projectRootElementCache); 195Assumed.NotNull(projectRootElementCache); 196Assumed.NotNull(toolset); 286Assumed.NotNull(directoryOfImportingFile); 288Assumed.False(taskRegistry._isInitialized, "Attempt to modify TaskRegistry after it was initialized."); 458Assumed.True(_isInitialized, "Attempt to read from TaskRegistry before its initialization was finished."); 684Assumed.NotNullOrEmpty(taskName); 685Assumed.NotNull(assemblyLoadInfo); 1170Assumed.True(taskFactoryParameters.Runtime != null && taskFactoryParameters.Architecture != null, "if the parameters are non-null, it should contain both Runtime and Architecture when we get here!"); 1412Assumed.NotNull(taskFactoryLoadInfo, "TaskFactoryLoadInfo should never be null");
Logging\BaseConsoleLogger.cs (1)
296return Assumed.Unreachable<LoggerVerbosity>();
Logging\ParallelLogger\ParallelConsoleLogger.cs (4)
676Assumed.NotNull(startedEvent, $"Project finished event for {e.ProjectFile} received without matching start event"); 901Assumed.NotNull(startedEvent, "Started event should not be null in the finished event handler"); 1453Assumed.NotNull(startedEvent, "Project Started should not be null in deferred target started"); 1748Assumed.NotNull(_startedEvent, "Cannot have finished counter without started counter. ");
Logging\ReusableLogger.cs (2)
341Assumed.Null(_buildTimeEventSource, "Already registered for build-time."); 371Assumed.NotNull(_designTimeEventSource, "Already unregistered for design-time.");
Resources\AssemblyResources.cs (2)
32Assumed.Null(s_msbuildExeResourceManager, "Only one extra resource manager"); 85Assumed.NotNull(resource, $"Missing resource '{name}'");
src\msbuild\src\Shared\BuildEventFileInfo.cs (1)
87Assumed.NotNull(e, "Need exception context.");
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (4)
32Assumed.NotNull(propertyInfo); 81Assumed.Null(currentWriter, "Cannot set a new writer over an old writer. Remove the old one first"); 100Assumed.NotNull(currentWriter, "Cannot unset an already null writer"); 161Assumed.Equal(staticWriter, _writerSetByThisInstance, $"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
50Assumed.True(Monitor.IsEntered(locker), "Lock should already have been taken");
src\msbuild\src\Shared\LogMessagePacketBase.cs (5)
299Assumed.NotNull(nodeBuildEvent, "nodeBuildEvent was null"); 386Assumed.NotEqual(_eventType, LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 427Assumed.NotEqual(_eventType, LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 448Assumed.NotNull(_buildEvent, $"Not Supported LoggingEventType {_eventType}"); 552_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}")
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (5)
172Assumed.Equal(_status, LinkStatus.Inactive, $"Link not inactive. Status is {_status}"); 292Assumed.NotEqual(_status, newStatus, $"Attempting to change status to existing status {_status}."); 315Assumed.NotEqual(_packetPump.ManagedThreadId, Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread."); 333Assumed.NotNull(_packetQueue, "packetQueue is null"); 334Assumed.NotNull(_packetAvailable, "packetAvailable is null");
src\msbuild\src\Shared\NodePacketFactory.cs (3)
51Assumed.True(_packetFactories.TryGetValue(packetType, out PacketFactoryRecord record), $"No packet handler for type {packetType}"); 62Assumed.True(_packetFactories.TryGetValue(packetType, out PacketFactoryRecord record), $"No packet handler for type {packetType}"); 72Assumed.True(_packetFactories.TryGetValue(packet.Type, out PacketFactoryRecord record), $"No packet handler for type {packet.Type}");
src\msbuild\src\Shared\OutOfProcTaskHostTaskResult.cs (3)
65Assumed.NotNull(taskException); 70Assumed.True( 79Assumed.NotNull(exceptionMessage, "If we have message args, we need a message.");
src\msbuild\src\Shared\ProjectErrorUtilities.cs (1)
255Assumed.NotNull(elementLocation);
src\msbuild\src\Shared\ProjectFileErrorUtilities.cs (1)
138Assumed.NotNull(projectFile, "Must specify the invalid project file. If project file is not available, use VerifyThrowInvalidProject() and pass in the XML node instead.");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
39Assumed.NotNull(message); 450Assumed.NotNull(unformattedMessage, $"The resource string \"{resourceName}\" was not found.");
src\msbuild\src\Shared\TaskHostConfiguration.cs (2)
186Assumed.NotNullOrEmpty(taskName); 187Assumed.NotNullOrEmpty(taskLocation);
src\msbuild\src\Shared\TaskHostTaskComplete.cs (1)
108Assumed.NotNull(result);
src\msbuild\src\Shared\TaskLoggingHelper.cs (4)
330Assumed.Null(errorCode, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message); 503Assumed.Null(errorCode, $"Message has error code: {message}"); 795Assumed.True(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'"); 1134Assumed.True(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
src\msbuild\src\Shared\TaskParameter.cs (7)
117Assumed.True(TaskParameterTypeVerifier.IsValidInputParameter(wrappedParameterType) || TaskParameterTypeVerifier.IsValidOutputParameter(wrappedParameterType), $"How did we manage to get a task parameter of type {wrappedParameterType} that isn't a valid parameter type?"); 151Assumed.Unreachable(); 186Assumed.Unreachable(); 257Assumed.Unreachable(); 632Assumed.NotNull(_escapedItemSpec); 954Assumed.NotNull(_escapedItemSpec); 955Assumed.NotNull(_customEscapedMetadata);
src\msbuild\src\Shared\TypeLoader.cs (1)
119Assumed.NotNull(isDesiredType, "need a type filter");
TelemetryInfra\TelemetryCollectorProvider.cs (2)
30Assumed.Equal(type, BuildComponentType.TelemetryCollector, $"Cannot create components of type {type}"); 36Assumed.NotNull(host, "BuildComponentHost was null");
Utilities\EngineFileUtilities.cs (2)
187Assumed.NotNullOrEmpty(filespecEscaped); 370Assumed.NotNull(fileList, "We must have a list of files here, even if it's empty.");
Utilities\ProjectWriter.cs (2)
142Assumed.Equal(itemVectorTransforms.Count, (surroundingTextPieces.Length - 1), "We must have two pieces of surrounding text for every item vector transform found."); 153Assumed.True(itemVectorTransform.Success, "Item vector transform must be matched by both the raw and decorated regular expressions.");
Utilities\Utilities.cs (2)
85Assumed.NotNull(s, "Need value to set."); 466Assumed.NotNullOrEmpty(toolsVersionToUse, "Should always return a ToolsVersion");
Microsoft.Build.Framework (55)
AssemblyUtilities.cs (2)
135Assumed.True(cultureTypesType?.Name == "CultureTypes" && 143Assumed.NotNull(cultures);
BackEnd\CommunicationsUtilities.cs (5)
360Assumed.Equal(bytes.Length, 4, "Int should be 4 bytes"); 559Assumed.NotNull(taskHostParameters.Runtime, "Should always have an explicit runtime when we call this method."); 560Assumed.NotNull(taskHostParameters.Architecture, "Should always have an explicit architecture when we call this method."); 576Assumed.Unreachable(); 610Assumed.Unreachable();
BackEnd\Handshake.cs (1)
68Assumed.True(
BackEnd\InterningBinaryReader.cs (2)
118Assumed.PositiveOrZero(n, $"From calculating based on the memorystream, about to read n = {n}. length = {length}, rawPosition = {rawPosition}, readLength = {readLength}, stringLength = {stringLength}, currPos = {currPos}."); 130Assumed.PositiveOrZero(n, $"From getting the length out of BaseStream.Read directly, about to read n = {n}. readLength = {readLength}, stringLength = {stringLength}, currPos = {currPos}");
BuildEnvironmentHelper.cs (1)
596_ => Assumed.Unreachable<string>($"Unknown processor architecture {NativeMethods.ProcessorArchitecture}"),
BuildException\BuildExceptionSerializationHelper.cs (2)
56Assumed.True(IsSupportedExceptionType(exceptionType), $"Type {exceptionType.FullName} is not recognized as a build exception type."); 75Assumed.NotNull(s_exceptionFactories, "Serialization contract was not initialized.");
Collections\ReadOnlyCollection.cs (1)
37Assumed.NotNull(backing, "Need backing collection");
FileUtilities.cs (3)
603Assumed.NotNullOrEmpty(path); 604Assumed.PositiveOrZero(trailingSegmentsToKeep, "trailing segments must be positive"); 1388Assumed.Positive(splitPath.Length, "Cannot call MakeRelative on a path of only slashes.");
FileUtilities_TempFiles.cs (1)
195Assumed.False(FileSystems.Default.FileExists(file), "Guid should be unique");
ItemSpecModifiers.cs (7)
345return Assumed.Unreachable<string>($"\"{modifier}\" is not a valid item-spec modifier."); 394Assumed.NotNull(itemSpec, "Need item-spec to modify."); 445Assumed.NotNull(definingProjectEscaped, "How could definingProjectEscaped by null?"); 477return Assumed.Unreachable<string>($"\"{modifier}\" is not a valid item-spec modifier."); 497Assumed.True( 562Assumed.True( 572Assumed.True(
Loader\LoadedType.cs (3)
38Assumed.NotNull(type, "We must have the type."); 39Assumed.NotNull(assemblyLoadInfo, "We must have the assembly the type was loaded from."); 40Assumed.NotNull(loadedAssembly, "The assembly should always be loaded even if only by MetadataLoadContext.");
MSBuildNameIgnoreCaseComparer.cs (3)
47Assumed.PositiveOrZero(lengthToCompare, $"Invalid {nameof(lengthToCompare)} '{constrainedString}' {start} {lengthToCompare}"); 48Assumed.PositiveOrZero(start, $"Invalid {nameof(start)} '{constrainedString}' {start} {lengthToCompare}"); 49Assumed.LessThanOrEqual(start, (constrainedString?.Length ?? 0) - lengthToCompare, $"Invalid {nameof(start)} '{constrainedString}' {start} {lengthToCompare}");
ReflectableTaskPropertyInfo.cs (1)
80Assumed.NotNull(_propertyInfo, $"Could not find property {Name} on type {_taskType.FullName} that the task factory indicated should exist.");
ReuseableStringBuilder.cs (2)
189Assumed.NotEqual(_capacity, -1, "Reusing after dispose"); 301Assumed.NotNull(returning._borrowedBuilder);
Utilities\AssemblyLoadInfo.cs (4)
27Assumed.True( 30Assumed.True( 112Assumed.Equal(translator.Mode, TranslationDirection.WriteToStream, "write only"); 198Assumed.True(Path.IsPathRooted(assemblyFile), "Assembly file path should be rooted");
Utilities\AssemblyNameExtension.cs (3)
327Assumed.False(immutable, "Object is immutable cannot replace the version"); 384Assumed.True(extensionToAdd.Immutable, "ExtensionToAdd is not immutable"); 515Assumed.Equal(result, baselineResult, "Optimized version of CompareBaseNameTo didn't return the same result as the baseline.");
Utilities\ConversionUtilities.cs (1)
158return Assumed.Unreachable<double>("Cannot numeric evaluate");
Utilities\FileMatcher.cs (7)
243_ => Assumed.Unreachable<IReadOnlyList<string>>("Unexpected filesystem entity type."), 459Assumed.False( 526Assumed.Equal( 851Assumed.True( 855Assumed.True( 859Assumed.NotNull(recursionState.RemainingWildcardDirectory, "Expected non-null remaning wildcard directory."); 1201Assumed.Equal(
Utilities\QuotingUtilities.cs (2)
69Assumed.GreaterThanOrEqual(maxSplits, 2, "There is no point calling this method for less than two splits."); 73Assumed.Equal(separators.IndexOf('"'), -1, "The double-quote character is not supported as a separator.");
XMakeAttributes.cs (4)
162Assumed.True(runtimeA != string.Empty && runtimeB != string.Empty, "We should never get an empty string passed to this method"); 206Assumed.True(runtimeA != string.Empty && runtimeB != string.Empty, "We should never get an empty string passed to this method"); 279Assumed.True(architectureA != string.Empty && architectureB != string.Empty, "We should never get an empty string passed to this method"); 346Assumed.True(architectureA != string.Empty && architectureB != string.Empty, "We should never get an empty string passed to this method");
Microsoft.Build.Tasks.Core (63)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130Assumed.True(FileSystems.Default.FileExists(_assemblyFolderConfigFile), $"The AssemblyFolders config file specified does not exist: {_assemblyFolderConfigFile}");
AssemblyDependency\CopyLocalState.cs (1)
102_ => Assumed.Unreachable<bool>("Unexpected CopyLocal flag."),
AssemblyDependency\GenerateBindingRedirects.cs (2)
200Assumed.NotNull(runtimeNode, "This should not be called if the \"runtime\" node is missing."); 374Assumed.Positive(SuggestedRedirects?.Length ?? 0, "This should not be called if there is no suggested redirect.");
AssemblyDependency\Node\OutOfProcRarClient.cs (2)
89Assumed.Unreachable($"Received unexpected log event type {logMessagePacket.Type}"); 96Assumed.Unreachable($"Received unexpected packet type {packet.Type}");
AssemblyDependency\Node\OutOfProcRarNodeEndpoint.cs (1)
127Assumed.Unreachable($"Received unexpected packet type {packetType}");
AssemblyDependency\Reference.cs (4)
621Assumed.False((IsPrimary && _primarySourceItem == null), "A primary reference must have a primary source item."); 622Assumed.True(IsPrimary || _primarySourceItem == null, "Only a primary reference can have a primary source item."); 745Assumed.True(remappedFrom.Immutable, " Remapped from is NOT immutable"); 746Assumed.True(remappedTo.Immutable, " Remapped to is NOT immutable");
AssemblyDependency\ReferenceTable.cs (8)
437Assumed.NotNull(assemblyName.Name, "Got an empty assembly name."); 462Assumed.NotNull(assemblyName.Name, "Got an empty assembly name."); 1694Assumed.LessThan(dependencyIterations, maxIterations, "Maximum iterations exceeded while looking for dependencies."); 1713Assumed.LessThan(moreResolvableIterations, maxIterations, "Maximum iterations exceeded while looking for resolvable references."); 2369Assumed.NotNull(assemblyReference0.assemblyName.FullName, "Got a null assembly name fullname. (0)"); 2370Assumed.NotNull(assemblyReference1.assemblyName.FullName, "Got a null assembly name fullname. (1)"); 2575Assumed.NotNull(a); 2576Assumed.NotNull(b);
AssemblyDependency\ResolveAssemblyReference.cs (1)
1500Assumed.NotNull(conflictCandidate);
AssemblyResources.cs (2)
27Assumed.NotNull(resource, $"Missing resource '{name}'"); 43Assumed.NotNull(resource, $"Missing resource '{name}'");
CommandLineBuilderExtension.cs (1)
236Assumed.True(treatAsFlags == null ||
GenerateResource.cs (5)
620Assumed.NotNull(resGenCommand); 2102Assumed.True(OutputResources != null && OutputResources.Length != 0, "Should be at least one output resource"); 2186Assumed.NotNull(_cache, "We did not create a cache!"); 2718Assumed.Equal(_readers.Count, 1, $"We have no readers, or we have multiple readers & are ignoring subsequent ones. Num readers: {_readers.Count}"); 2726Assumed.Equal(_readers.Count, 1, $"We have no readers, or we have multiple readers & are ignoring subsequent ones. Num readers: {_readers.Count}");
MSBuild.cs (2)
155_ => Assumed.Unreachable<string>($"Unexpected case {_skipNonExistentProjects}"), 339Assumed.Equal(skipNonExistProjects, SkipNonExistentProjectsBehavior.Error, $"skipNonexistentProjects has unexpected value {skipNonExistProjects}");
SGen.cs (2)
114=> Assumed.Unreachable<string>(); 117=> Assumed.Unreachable<string>();
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (4)
32Assumed.NotNull(propertyInfo); 81Assumed.Null(currentWriter, "Cannot set a new writer over an old writer. Remove the old one first"); 100Assumed.NotNull(currentWriter, "Cannot unset an already null writer"); 161Assumed.Equal(staticWriter, _writerSetByThisInstance, $"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
50Assumed.True(Monitor.IsEntered(locker), "Lock should already have been taken");
src\msbuild\src\Shared\LanguageParser\StreamMappedString.cs (5)
195Assumed.NotEqual(originalPageNumber, _currentPageNumber, "Expected a new page."); 290Assumed.NotEqual(_charactersRead, _pageSize, "Attempt to append to non-last page."); 305Assumed.NotNull(_priorPage, "There is no last character in the stream."); 389Assumed.Positive(charactersExtracted, "Expected non-zero extraction count."); 404Assumed.InRange(page, _currentPageNumber - 1, _currentPageNumber, "Could not get character count for this page.");
src\msbuild\src\Shared\LanguageParser\tokenCharReader.cs (2)
267Assumed.NotEqual(originalPosition, _position, "Expected position to be incremented."); 274Assumed.NotEqual(originalPosition, _position, "Expected position to be incremented.");
src\msbuild\src\Shared\LogMessagePacketBase.cs (5)
299Assumed.NotNull(nodeBuildEvent, "nodeBuildEvent was null"); 386Assumed.NotEqual(_eventType, LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 427Assumed.NotEqual(_eventType, LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 448Assumed.NotNull(_buildEvent, $"Not Supported LoggingEventType {_eventType}"); 552_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}")
src\msbuild\src\Shared\NodePacketFactory.cs (3)
51Assumed.True(_packetFactories.TryGetValue(packetType, out PacketFactoryRecord record), $"No packet handler for type {packetType}"); 62Assumed.True(_packetFactories.TryGetValue(packetType, out PacketFactoryRecord record), $"No packet handler for type {packetType}"); 72Assumed.True(_packetFactories.TryGetValue(packet.Type, out PacketFactoryRecord record), $"No packet handler for type {packet.Type}");
src\msbuild\src\Shared\NodePipeBase.cs (1)
252Assumed.NotNull(_packetFactory, "No packet factory is registered for deserialization.");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
39Assumed.NotNull(message); 450Assumed.NotNull(unformattedMessage, $"The resource string \"{resourceName}\" was not found.");
src\msbuild\src\Shared\TaskParameter.cs (7)
117Assumed.True(TaskParameterTypeVerifier.IsValidInputParameter(wrappedParameterType) || TaskParameterTypeVerifier.IsValidOutputParameter(wrappedParameterType), $"How did we manage to get a task parameter of type {wrappedParameterType} that isn't a valid parameter type?"); 151Assumed.Unreachable(); 186Assumed.Unreachable(); 257Assumed.Unreachable(); 632Assumed.NotNull(_escapedItemSpec); 954Assumed.NotNull(_escapedItemSpec); 955Assumed.NotNull(_customEscapedMetadata);
XslTransformation.cs (1)
521return Assumed.Unreachable<XslCompiledTransform>();
Microsoft.Build.Utilities.Core (23)
AssemblyResources.cs (1)
29Assumed.NotNull(resource, $"Missing resource '{name}'");
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (4)
32Assumed.NotNull(propertyInfo); 81Assumed.Null(currentWriter, "Cannot set a new writer over an old writer. Remove the old one first"); 100Assumed.NotNull(currentWriter, "Cannot unset an already null writer"); 161Assumed.Equal(staticWriter, _writerSetByThisInstance, $"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
50Assumed.True(Monitor.IsEntered(locker), "Lock should already have been taken");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
39Assumed.NotNull(message); 450Assumed.NotNull(unformattedMessage, $"The resource string \"{resourceName}\" was not found.");
src\msbuild\src\Shared\TaskLoggingHelper.cs (4)
330Assumed.Null(errorCode, "This message contains an error code (" + errorCode + "), yet it was logged as a regular message: " + message); 503Assumed.Null(errorCode, $"Message has error code: {message}"); 795Assumed.True(string.IsNullOrEmpty(messageCode), "Called LogErrorFromResources instead of LogErrorWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'"); 1134Assumed.True(string.IsNullOrEmpty(messageCode), "Called LogWarningFromResources instead of LogWarningWithCodeFromResources, but message '" + throwAwayMessageBody + "' does have an error code '" + messageCode + "'");
ToolLocationHelper.cs (3)
3024Assumed.NotNullOrEmpty(sdk.Path, "SDK path must be set"); 3402_ => Assumed.Unreachable<string>(), 3717_ => Assumed.Unreachable<SharedDotNetFrameworkArchitecture>(),
ToolTask.cs (8)
1052Assumed.NotEqual(Timeout, System.Threading.Timeout.Infinite, "A time-out value must have been specified or the task must be cancelled."); 1188Assumed.NotNull(dataQueue, "The data queue must be available."); 1220Assumed.NotNull(dataAvailableSignal, "The signalling event must be available."); 1248Assumed.NotNull(_toolTimeoutExpired, "The signalling event for tool time-out must be available."); 1267Assumed.NotNull(_toolExited, "The signalling event for tool exit must be available."); 1332Assumed.NotNull(dataQueue, "The data queue must be available."); 1345Assumed.NotNull(dataAvailableSignal, "The signalling event must be available."); 1683Assumed.Equal(nextAction, HostObjectInitializationStatus.UseAlternateToolToExecute, "Invalid return status");
MSBuild (68)
AssemblyResources.cs (1)
33Assumed.NotNull(resource, $"Missing resource '{name}'");
CommandLine\CommandLineParser.cs (4)
549Assumed.LessThanOrEqual(projectSwitchParameters.Length, 1, "Expect exactly one project at a time."); 600Assumed.Equal(switchName, unquotedSwitchIndicatorAndName.Substring(switchIndicatorsLength), "The switch name extracted from either the partially or completely unquoted arg should be the same."); 602Assumed.GreaterThanOrEqual(doubleQuotesRemovedFromArg, doubleQuotesRemovedFromSwitchIndicatorAndName, "The name portion of the switch cannot contain more quoting than the arg itself."); 630Assumed.NotNull(switchParameters, "We must be able to extract the switch parameters.");
CommandLine\CommandLineSwitchException.cs (1)
152Assumed.NotNull(errorMessage, "The resource string must exist.");
InitializationException.cs (4)
145Assumed.NotNull(errorMessage, "The resource string must exist."); 167Assumed.NotNull(errorMessage, "The resource string must exist."); 191Assumed.NotNull(errorMessage, "The resource string must exist."); 208Assumed.NotNull(message, "The string must exist.");
JsonOutputFormatter.cs (4)
35Assumed.Null(_topLevelNode["Properties"], "Should not add multiple lists of properties to the json format."); 53Assumed.Null(_topLevelNode["Items"], "Should not add multiple lists of items to the json format."); 89Assumed.Null(_topLevelNode["Items"], "Should not add multiple lists of items to the json format."); 130Assumed.Null(_topLevelNode["TargetResults"], "Should not add multiple lists of target results to the json format.");
OutOfProcTaskHostNode.cs (14)
268Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration during a BuildEngine callback!"); 280Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration during a BuildEngine callback!"); 292Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration during a BuildEngine callback!"); 304Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration during a BuildEngine callback!"); 515Assumed.True(targetOutputsPerProject is null || projectFileNames.Length == targetOutputsPerProject.Length, $"projectFileNames has {projectFileNames.Length} entries but targetOutputsPerProject has {targetOutputsPerProject?.Length ?? 0} -- lengths must match."); 741Assumed.NotNull(_taskHost.EffectiveConfiguration, "We should never have a null configuration during a BuildEngine callback!"); 1169Assumed.Zero(_activeTaskCount, $"Why are we getting a TaskHostConfiguration packet while a task is actively executing? activeTaskCount={_activeTaskCount}"); 1258Assumed.Zero(_activeTaskCount, "We should never have a task in the process of executing when we receive NodeBuildComplete."); 1484Assumed.True(taskContext is null || taskContext.State != TaskExecutionState.BlockedOnCallback, "Task completed while still in BlockedOnCallback state."); 1559Assumed.NotNull(s_mismatchedEnvironmentValues); 1622Assumed.NotNull(s_mismatchedEnvironmentValues); 1750Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration when we're trying to log messages!"); 1767Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration when we're trying to log warnings!"); 1790Assumed.NotNull(EffectiveConfiguration, "We should never have a null configuration when we're trying to log errors!");
src\msbuild\src\Shared\Debugging\PrintLineDebugger.cs (4)
32Assumed.NotNull(propertyInfo); 81Assumed.Null(currentWriter, "Cannot set a new writer over an old writer. Remove the old one first"); 100Assumed.NotNull(currentWriter, "Cannot unset an already null writer"); 161Assumed.Equal(staticWriter, _writerSetByThisInstance, $"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
50Assumed.True(Monitor.IsEntered(locker), "Lock should already have been taken");
src\msbuild\src\Shared\LogMessagePacketBase.cs (5)
299Assumed.NotNull(nodeBuildEvent, "nodeBuildEvent was null"); 386Assumed.NotEqual(_eventType, LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 427Assumed.NotEqual(_eventType, LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 448Assumed.NotNull(_buildEvent, $"Not Supported LoggingEventType {_eventType}"); 552_ => Assumed.Unreachable<BuildEventArgs>($"Should not get to the default of GetBuildEventArgFromId ID: {_eventType}")
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (5)
172Assumed.Equal(_status, LinkStatus.Inactive, $"Link not inactive. Status is {_status}"); 292Assumed.NotEqual(_status, newStatus, $"Attempting to change status to existing status {_status}."); 315Assumed.NotEqual(_packetPump.ManagedThreadId, Thread.CurrentThread.ManagedThreadId, "Can't join on the same thread."); 333Assumed.NotNull(_packetQueue, "packetQueue is null"); 334Assumed.NotNull(_packetAvailable, "packetAvailable is null");
src\msbuild\src\Shared\NodePacketFactory.cs (3)
51Assumed.True(_packetFactories.TryGetValue(packetType, out PacketFactoryRecord record), $"No packet handler for type {packetType}"); 62Assumed.True(_packetFactories.TryGetValue(packetType, out PacketFactoryRecord record), $"No packet handler for type {packetType}"); 72Assumed.True(_packetFactories.TryGetValue(packet.Type, out PacketFactoryRecord record), $"No packet handler for type {packet.Type}");
src\msbuild\src\Shared\OutOfProcTaskHostTaskResult.cs (3)
65Assumed.NotNull(taskException); 70Assumed.True( 79Assumed.NotNull(exceptionMessage, "If we have message args, we need a message.");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
39Assumed.NotNull(message); 450Assumed.NotNull(unformattedMessage, $"The resource string \"{resourceName}\" was not found.");
src\msbuild\src\Shared\TaskHostConfiguration.cs (2)
186Assumed.NotNullOrEmpty(taskName); 187Assumed.NotNullOrEmpty(taskLocation);
src\msbuild\src\Shared\TaskHostTaskComplete.cs (1)
108Assumed.NotNull(result);
src\msbuild\src\Shared\TaskParameter.cs (7)
117Assumed.True(TaskParameterTypeVerifier.IsValidInputParameter(wrappedParameterType) || TaskParameterTypeVerifier.IsValidOutputParameter(wrappedParameterType), $"How did we manage to get a task parameter of type {wrappedParameterType} that isn't a valid parameter type?"); 151Assumed.Unreachable(); 186Assumed.Unreachable(); 257Assumed.Unreachable(); 632Assumed.NotNull(_escapedItemSpec); 954Assumed.NotNull(_escapedItemSpec); 955Assumed.NotNull(_customEscapedMetadata);
src\msbuild\src\Shared\TypeLoader.cs (1)
119Assumed.NotNull(isDesiredType, "need a type filter");
XMake.cs (6)
1734Assumed.True(ex.HasBeenLogged, "Should have been logged"); 2362Assumed.True(!invokeBuild || !string.IsNullOrEmpty(projectFile), "We should have a project file if we're going to build."); 3112Assumed.LessThanOrEqual(parameters.Length, 1, "Expect exactly one project at a time."); 3867Assumed.InRange(loggerSpec.Count, 1, 2, "SplitUnquoted() must return at least one string, and no more than two."); 3912Assumed.InRange(loggerSpec.Count, 1, 2, "SplitUnquoted() must return at least one string, and no more than two."); 3927Assumed.Positive(loggerTypeSpec.Count, "SplitUnquoted() must return at least one string");