144 references to InternalError
Microsoft.Build (66)
BackEnd\BuildManager\BuildSubmission.cs (1)
228InternalError.Throw($"BuildResult configuration ({result.ConfigurationId}) doesn't match BuildRequest configuration ({BuildRequest?.ConfigurationId})");
BackEnd\Client\MSBuildClientPacketPump.cs (2)
259InternalError.Throw("Server disconnected abruptly"); 263InternalError.Throw($"Incomplete header read. {headerBytesRead} of {headerByte.Length} bytes read");
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
340InternalError.Throw($"Failure during engine shutdown. Exception: {e}"); 1467InternalError.Throw(e.Message, e);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
440InternalError.Throw($"Unexpected shutdown code {reason} received.");
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
87return InternalError.Throw<IList<NodeInfo>>($"Exceeded max node count of '{ComponentHost.BuildParameters.MaxNodeCount}', current count is '{_nodeContexts.Count}' ");
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
311InternalError.Throw(
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
542InternalError.Throw(ResourceUtilities.GetResourceString("SDKPathResolution_Failed")); 547InternalError.Throw(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("SDKPathCheck_Failed", path));
BackEnd\Components\Logging\BuildEventArgTransportSink.cs (1)
125=> InternalError.Throw("Do not use this method for the transport sink");
BackEnd\Components\Logging\EventSourceSink.cs (2)
303InternalError.Throw("Unknown event args type."); 352InternalError.Throw("Unknown event args type.");
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
638InternalError.Throw($"Unknown plugin type: {plugin.Name}");
BackEnd\Components\RequestBuilder\IntrinsicTask.cs (1)
73_ => InternalError.Throw<IntrinsicTask>($"Unhandled intrinsic task type {taskInstance.GetType().GetTypeInfo().BaseType}"),
BackEnd\Components\RequestBuilder\IntrinsicTasks\IntrinsicTaskFactory.cs (1)
83return InternalError.Throw<ITask>($"Unexpected intrinsic task type {TaskType}");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
858InternalError.Throw(ex.Message, ex);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
338=> InternalError.Throw<Task>("This method should never be called by anyone except the TargetBuilder.");
BackEnd\Components\Scheduler\SchedulableRequest.cs (1)
464InternalError.Throw($"State {_state} is not one of the expected states.");
BackEnd\Components\Scheduler\SchedulingData.cs (1)
304InternalError.Throw("Should not be updating a request after it has reached the Completed state.");
BackEnd\Components\SdkResolution\SdkResolverManifest.cs (1)
133InternalError.Throw($"A regular expression parsing error occurred while parsing {filePath}.", ex);
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
194InternalError.Throw($"""Timeout exceeded matching sdk "{sdk.Name}" to <ResolvableSdkPattern> from sdk resolver manifest {manifest.DisplayName}.""", ex);
BackEnd\Node\InProcNode.cs (3)
194InternalError.Throw(e.Message, e); 226=> InternalError.Throw("Unexpected call to DeserializeAndRoutePacket on the in-proc node."); 233=> InternalError.Throw<INodePacket>("Unexpected call to DeserializePacket on the in-proc node.");
Collections\CopyOnWritePropertyDictionary.cs (1)
300=> InternalError.Throw("CopyTo is not supported on PropertyDictionary.");
Collections\PropertyDictionary.cs (2)
115=> InternalError.Throw<ICollection<string>>("Keys is not supported on PropertyDictionary."); 438=> InternalError.Throw("CopyTo is not supported on PropertyDictionary.");
Collections\ReadOnlyConvertingDictionary.cs (1)
55=> InternalError.Throw<ICollection<N>>("Values is not supported on ReadOnlyConvertingDictionary.");
Construction\ProjectChooseElement.cs (1)
82=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Construction\ProjectElement.cs (1)
509InternalError.Throw($"{GetType().Name}.Clone() returned an instance of type {clone.GetType().Name}.");
Construction\ProjectExtensionsElement.cs (1)
88=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Construction\ProjectOtherwiseElement.cs (1)
77=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Construction\ProjectRootElement.cs (1)
647=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Construction\ProjectUsingTaskBodyElement.cs (1)
109=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Construction\ProjectUsingTaskParameterElement.cs (1)
139=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Construction\UsingTaskParameterGroupElement.cs (1)
66=> InternalError.Throw<ElementLocation>("Should not evaluate this");
Definition\ProjectCollection.cs (1)
1814InternalError.Throw("Throwing from logger shutdown", ex);
Definition\ProjectItem.cs (1)
933set => InternalError.Throw("Cannot change the item type on ProjectItem.ProjectItemFactory");
Evaluation\Evaluator.cs (3)
584InternalError.Throw("Unexpected child"); 940InternalError.Throw("Unexpected child type"); 1498InternalError.Throw("Unexpected child type");
Instance\TaskFactories\AssemblyTaskFactory.cs (8)
113=> InternalError.Throw<bool>("Use internal call to properly initialize the assembly task factory"); 135=> InternalError.Throw<bool>("Use internal call to properly initialize the assembly task factory"); 156=> InternalError.Throw<ITask>("Use internal call to properly create a task instance from the assembly task factory"); 176=> InternalError.Throw<ITask>("Use internal call to properly create a task instance from the assembly task factory"); 619InternalError.Throw($"How did we get two runtime values that were unmergeable? TaskIdentity Runtime: {taskIdentityParameters.Runtime}, FactoryIdentity Runtime: {factoryIdentityParameters.Runtime}."); 624InternalError.Throw($"How did we get two architecture values that were unmergeable? TaskIdentity Architecture: {taskIdentityParameters.Architecture}, FactoryIdentity Architecture: {factoryIdentityParameters.Architecture}."); 769=> InternalError.Throw<bool>("Use internal call to properly initialize the assembly task factory"); 789=> InternalError.Throw<ITask>("Use internal call to properly create a task instance from the assembly task factory");
Instance\TaskFactories\TaskHostTask.cs (2)
703InternalError.Throw("Unknown event args type."); 762InternalError.Throw($"HandleBuildRequest requires IBuildEngine3 but _buildEngine is {_buildEngine?.GetType().Name ?? "null"}");
Instance\TaskFactoryWrapper.cs (1)
234: InternalError.Throw<object?>($"Task does not implement IGeneratedTask and we don't have {typeof(ReflectableTaskPropertyInfo)} either.");
Logging\DistributedLoggers\DistributedFileLogger.cs (1)
187get => InternalError.Throw<LoggerVerbosity>("Should not be getting verbosity from distributed file logger");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
37InternalError.Throw($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\LogMessagePacketBase.cs (1)
779InternalError.Throw($"Not Supported LoggingEventType {eventType}");
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (2)
185InternalError.Throw("Connect() not valid on the out of proc endpoint."); 795InternalError.Throw($"waitId {waitId} out of range.");
src\msbuild\src\Shared\ResourceUtilities.cs (4)
428InternalError.Throw($"Invalid resource parameter type, was {param.GetType().FullName}"); 457InternalError.Throw(e.Message); 464InternalError.Throw(e.Message); 471InternalError.Throw(e.Message);
src\msbuild\src\Shared\TaskLoggingHelper.cs (1)
1407InternalError.Throw("Impossible canonical part.");
Utilities\EngineFileUtilities.cs (3)
286InternalError.Throw(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword( 329InternalError.Throw(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword( 361InternalError.Throw(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword(
Microsoft.Build.Framework (53)
Assumed.cs (44)
39InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to be null."); 58InternalError.Throw(handler.GetFormattedText()); 76InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to be non-null."); 95InternalError.Throw(handler.GetFormattedText()); 112InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to be non-null and non-empty."); 130InternalError.Throw(handler.GetFormattedText()); 148InternalError.Throw(message ?? $"Expected {GetValueString(collectionExpression)} to be non-null and non-empty."); 167InternalError.Throw(handler.GetFormattedText()); 186InternalError.Throw(message ?? $"{GetConditionString(conditionExpression)} expected to be true."); 204InternalError.Throw(handler.GetFormattedText()); 221InternalError.Throw(message ?? $"{GetConditionString(conditionExpression)} expected to be false."); 239InternalError.Throw(handler.GetFormattedText()); 259InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to be equal to '{GetStringOrNull(other)}'."); 280InternalError.Throw(handler.GetFormattedText()); 302InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to be equal to '{GetStringOrNull(other)}' ({comparisonType})."); 325InternalError.Throw(handler.GetFormattedText()); 346InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to not be equal to '{GetStringOrNull(other)}'."); 367InternalError.Throw(handler.GetFormattedText()); 389InternalError.Throw(message ?? $"Expected {GetValueString(valueExpression)} to not be equal to '{GetStringOrNull(other)}' ({comparisonType})."); 412InternalError.Throw(handler.GetFormattedText()); 428InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be greater than '{GetStringOrNull(other)}'."); 450InternalError.Throw(handler.GetFormattedText()); 466InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be greater than or equal to '{GetStringOrNull(other)}'."); 488InternalError.Throw(handler.GetFormattedText()); 504InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be less than '{GetStringOrNull(other)}'."); 526InternalError.Throw(handler.GetFormattedText()); 542InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be less than or equal to '{GetStringOrNull(other)}'."); 564InternalError.Throw(handler.GetFormattedText()); 577InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be zero."); 595InternalError.Throw(handler.GetFormattedText()); 608InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be negative."); 626InternalError.Throw(handler.GetFormattedText()); 639InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be negative or zero."); 657InternalError.Throw(handler.GetFormattedText()); 670InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be positive."); 688InternalError.Throw(handler.GetFormattedText()); 701InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be positive or zero."); 719InternalError.Throw(handler.GetFormattedText()); 737InternalError.Throw(message ?? $"Expected {GetValueString(value)} to be in range [{GetStringOrNull(low)}, {GetStringOrNull(high)}]."); 762InternalError.Throw(handler.GetFormattedText()); 772=> InternalError.Throw(message ?? "Unreachable code reached."); 781=> InternalError.Throw(handler.GetFormattedText()); 794=> InternalError.Throw<T>(message ?? "Unreachable code reached."); 809=> InternalError.Throw<T>(handler.GetFormattedText());
BinaryTranslator.cs (2)
103=> InternalError.Throw<BinaryWriter>("Cannot get writer from reader."); 940=> InternalError.Throw<BinaryReader>("Cannot get reader from writer.");
BuildCanceledEventArgs.cs (1)
49InternalError.Throw("Message cannot be null or consist only white-space characters.");
BuildException\BuildExceptionSerializationHelper.cs (1)
64InternalError.Throw("Serialization contract was already initialized.");
ErrorUtilities.cs (1)
75InternalError.Throw($"{value} unexpectedly not a rooted path");
Traits.cs (3)
474: InternalError.Throw<bool?>($"Environment variable \"{environmentVariable}\" should have values \"true\", \"false\" or undefined"); 496return InternalError.Throw<ProjectInstanceTranslationMode?>($"Invalid escape hatch for project instance translation: {mode}"); 534return InternalError.Throw<SdkReferencePropertyExpansionMode?>($"Invalid escape hatch for SdkReference property expansion: {mode}");
Utilities\FileMatcher.cs (1)
1695InternalError.Throw($"Unexpected empty '{nameof(input)}' provided.");
Microsoft.Build.Tasks.Core (7)
src\msbuild\src\Shared\ErrorUtilities.cs (1)
37InternalError.Throw($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\LogMessagePacketBase.cs (1)
779InternalError.Throw($"Not Supported LoggingEventType {eventType}");
src\msbuild\src\Shared\NodePipeBase.cs (1)
261return InternalError.Throw<INodePacket>($"Exception while deserializing packet {packetType}: {e}");
src\msbuild\src\Shared\ResourceUtilities.cs (4)
428InternalError.Throw($"Invalid resource parameter type, was {param.GetType().FullName}"); 457InternalError.Throw(e.Message); 464InternalError.Throw(e.Message); 471InternalError.Throw(e.Message);
Microsoft.Build.Utilities.Core (7)
src\msbuild\src\Shared\ErrorUtilities.cs (1)
37InternalError.Throw($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\ResourceUtilities.cs (4)
428InternalError.Throw($"Invalid resource parameter type, was {param.GetType().FullName}"); 457InternalError.Throw(e.Message); 464InternalError.Throw(e.Message); 471InternalError.Throw(e.Message);
src\msbuild\src\Shared\TaskLoggingHelper.cs (1)
1407InternalError.Throw("Impossible canonical part.");
ToolTask.cs (1)
1016InternalError.Throw("Unknown tool notification.");
MSBuild (11)
OutOfProcTaskHostNode.cs (3)
942InternalError.Throw($"HandleCallbackResponse called with non-callback packet type: {packet.GetType().Name}"); 964InternalError.Throw($"TaskHost received callback response with no pending request. RequestId={callbackPacket.RequestId}, Type={packet.Type}"); 1101InternalError.Throw($"Task ID {taskId} already exists in TaskHost.");
src\msbuild\src\Shared\ErrorUtilities.cs (1)
37InternalError.Throw($"This type does not implement ToString() properly {param.GetType().FullName!}");
src\msbuild\src\Shared\LogMessagePacketBase.cs (1)
779InternalError.Throw($"Not Supported LoggingEventType {eventType}");
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (2)
185InternalError.Throw("Connect() not valid on the out of proc endpoint."); 795InternalError.Throw($"waitId {waitId} out of range.");
src\msbuild\src\Shared\ResourceUtilities.cs (4)
428InternalError.Throw($"Invalid resource parameter type, was {param.GetType().FullName}"); 457InternalError.Throw(e.Message); 464InternalError.Throw(e.Message); 471InternalError.Throw(e.Message);