217 references to ErrorUtilities
Microsoft.Build (217)
BackEnd\BuildManager\BuildManager.cs (3)
1587ErrorUtilities.VerifyThrowArgument( 2456ErrorUtilities.ThrowInvalidOperation(exceptionResouorce); 2465ErrorUtilities.VerifyThrowInvalidOperation(_buildManagerState == requiredState, exceptionResouorce);
BackEnd\BuildManager\BuildParameters.cs (3)
487ErrorUtilities.VerifyThrowArgumentNull(logger, nameof(ForwardingLoggers), "NullLoggerNotAllowed"); 547ErrorUtilities.VerifyThrowArgumentNull(logger, "Loggers", "NullLoggerNotAllowed"); 564ErrorUtilities.VerifyThrowArgument(value > 0, "InvalidMaxNodeCount");
BackEnd\BuildManager\BuildRequestData.cs (1)
65Shared.ErrorUtilities.ThrowInvalidOperation("OM_PartialEvaluationCannotBuild", projectInstance.EvaluationStage);
BackEnd\BuildManager\BuildSubmission.cs (1)
72ErrorUtilities.VerifyThrowInvalidOperation(!IsCompleted, "SubmissionAlreadyComplete");
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
733ErrorUtilities.VerifyThrowArgument(ConversionUtilities.CanConvertStringToBool(value), "MSBuild.InvalidSkipNonexistentProjectValue");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
309ErrorUtilities.ThrowInvalidOperation("UnableToCancel");
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (7)
979ErrorUtilities.ThrowIfTypeDoesNotImplementToString(outputs[0]); 997ErrorUtilities.ThrowIfTypeDoesNotImplementToString(inputs[0]); 1005ErrorUtilities.ThrowIfTypeDoesNotImplementToString(outputs[i]); 1023ErrorUtilities.ThrowIfTypeDoesNotImplementToString(inputs[0]); 1040ErrorUtilities.ThrowIfTypeDoesNotImplementToString(input); 1096ErrorUtilities.ThrowIfTypeDoesNotImplementToString(input); 1104ErrorUtilities.ThrowIfTypeDoesNotImplementToString(output);
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
292ErrorUtilities.VerifyThrowArgument((targetOutputsPerProject == null) || (projectFileNames.Length == targetOutputsPerProject.Length), "General.TwoVectorsMustHaveSameLength", projectFileNames.Length, targetOutputsPerProject?.Length ?? 0, "projectFileNames", "targetOutputsPerProject");
BackEnd\Shared\BuildRequestConfiguration.cs (2)
748ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e); 787ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e);
Collections\ReadOnlyConvertingDictionary.cs (7)
73set => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 81ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 97ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 125ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 133ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 141ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedConvertingCollectionValueToBacking"); 163ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (3)
258ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 411ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 813ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
Construction\ProjectChooseElement.cs (2)
54set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 102ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectElement.cs (1)
354ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType");
Construction\ProjectElementContainer.cs (10)
297ErrorUtilities.VerifyThrowArgument(child.Parent == this, "OM_NodeNotAlreadyParentedByThis"); 355ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 684ErrorUtilities.VerifyThrowInvalidOperation(Parent != null || ContainingProject == this, "OM_ParentNotParented"); 685ErrorUtilities.VerifyThrowInvalidOperation(reference == null || reference.Parent == this, "OM_ReferenceDoesNotHaveThisParent"); 686ErrorUtilities.VerifyThrowInvalidOperation(child.Parent == null, "OM_NodeAlreadyParented"); 687ErrorUtilities.VerifyThrowInvalidOperation(child.ContainingProject == ContainingProject, "OM_MustBeSameProject"); 707ErrorUtilities.VerifyThrowInvalidOperation(ancestor != element, "OM_SelfAncestor"); 839public void Add(T item) => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 841public void Clear() => ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection"); 866ErrorUtilities.ThrowInvalidOperation("OM_NotSupportedReadOnlyCollection");
Construction\ProjectExtensionsElement.cs (3)
56set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 159ErrorUtilities.VerifyThrowArgument(GetType().IsEquivalentTo(element.GetType()), "CannotCopyFromElementOfThatType"); 199ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectImportElement.cs (1)
179ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectImportGroupElement, "OM_CannotAcceptParent");
Construction\ProjectImportGroupElement.cs (1)
90ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectItemDefinitionElement.cs (1)
116ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectItemDefinitionGroupElement, "OM_CannotAcceptParent");
Construction\ProjectItemDefinitionGroupElement.cs (1)
81ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectItemElement.cs (17)
105ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update); 127ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Remove.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.remove); 128ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || Update.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.exclude, XMakeAttributes.update); 149ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Include.Length == 0 && Update.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update); 168ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || (Remove.Length == 0 && Include.Length == 0), "OM_OneOfAttributeButNotMore", ElementName, XMakeAttributes.include, XMakeAttributes.remove, XMakeAttributes.update); 189ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement || Parent.Parent is ProjectRootElement, "OM_NoMatchOnMetadataOutsideTargets"); 191ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length != 0, "OM_MatchOnMetadataOnlyApplicableToRemoveItems", ElementName, XMakeAttributes.matchOnMetadata); 211ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || MatchOnMetadata.Length != 0, "OM_MatchOnMetadataOptionsOnlyApplicableToItemsWithMatchOnMetadata", ElementName, XMakeAttributes.matchOnMetadataOptions); 231ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepMetadataOutsideTargets"); 232ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || RemoveMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.removeMetadata, XMakeAttributes.keepMetadata); 252ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoRemoveMetadataOutsideTargets"); 253ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(value) || KeepMetadata.Length == 0, "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.keepMetadata, XMakeAttributes.removeMetadata); 273ErrorUtilities.VerifyThrowInvalidOperation(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepDuplicatesOutsideTargets"); 430ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemType), "CannotModifyReservedItem", itemType); 449ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newItemType), "CannotModifyReservedItem", newItemType); 480ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectTargetElement || (Include.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove"); 481ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectRootElement || parent.Parent is ProjectTargetElement || parent.Parent is ProjectWhenElement || parent.Parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectItemGroupElement.cs (1)
177ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectMetadataElement.cs (4)
108ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 109ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name); 126ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newName), "CannotModifyReservedItemMetadata", newName); 170ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectItemElement || parent is ProjectItemDefinitionElement, "OM_CannotAcceptParent");
Construction\ProjectOnErrorElement.cs (1)
90ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectTargetElement, "OM_CannotAcceptParent");
Construction\ProjectOtherwiseElement.cs (3)
52set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 96ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectChooseElement, "OM_CannotAcceptParent"); 97ErrorUtilities.VerifyThrowInvalidOperation(!(nextSibling is ProjectWhenElement) && !(previousSibling is ProjectOtherwiseElement) && !(nextSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\ProjectOutputElement.cs (4)
93ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(PropertyName), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.itemName, XMakeAttributes.propertyName); 113ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(ItemType), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.itemName, XMakeAttributes.propertyName); 141ErrorUtilities.VerifyThrowArgument( 170ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectTaskElement, "OM_CannotAcceptParent");
Construction\ProjectPropertyElement.cs (3)
98ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name) && !ReservedPropertyNames.IsReservedProperty(name), "OM_CannotCreateReservedProperty", name); 115ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(newName), "CannotModifyReservedProperty", newName); 135ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectPropertyGroupElement, "OM_CannotAcceptParent");
Construction\ProjectPropertyGroupElement.cs (1)
110ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectRootElement.cs (11)
234ErrorUtilities.VerifyThrowInternalRooted(path); 296set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 1540ErrorUtilities.VerifyThrowInvalidOperation(_projectFileLocation != null, "OM_MustSetFileNameBeforeSave"); 1648ErrorUtilities.VerifyThrowInvalidOperation(!string.IsNullOrEmpty(FullPath), "ValueNotSet", $"{nameof(ProjectRootElement)}.{nameof(FullPath)}"); 1661ErrorUtilities.VerifyThrowInvalidOperation(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path); 1759ErrorUtilities.VerifyThrowInternalRooted(path); 1791ErrorUtilities.VerifyThrowInternalRooted(fullPath); 1828ErrorUtilities.ThrowInvalidOperation("OM_CannotAcceptParent"); 2049ErrorUtilities.VerifyThrowInternalRooted(projectFile); 2084ErrorUtilities.VerifyThrowInternalRooted(fullPath); 2165ErrorUtilities.ThrowInvalidOperation("NoReloadOnUnsavedChanges", null);
Construction\ProjectSdkElement.cs (1)
83ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectTargetElement.cs (2)
112ErrorUtilities.ThrowArgument("OM_NameInvalid", unescapedValue, unescapedValue[indexOfSpecialCharacter]); 417ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectTaskElement.cs (2)
327ErrorUtilities.VerifyThrowArgument(!XMakeAttributes.IsSpecialTaskAttribute(name), "CannotAccessKnownAttributes", name); 427ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectTargetElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskBodyElement.cs (2)
56set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 155ErrorUtilities.VerifyThrowInvalidOperation(parentUsingTask != null, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskElement.cs (4)
57ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyName), "OM_EitherAttributeButNotBoth", ElementName, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName); 74ErrorUtilities.VerifyThrowInvalidOperation(String.IsNullOrEmpty(AssemblyFile), "OM_EitherAttributeButNotBoth", XMakeElements.usingTask, XMakeAttributes.assemblyFile, XMakeAttributes.assemblyName); 234ErrorUtilities.VerifyThrowArgument( 268ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskParameterElement.cs (2)
52set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 187ErrorUtilities.VerifyThrowInvalidOperation(parent is UsingTaskParameterGroupElement, "OM_CannotAcceptParent");
Construction\ProjectWhenElement.cs (2)
83ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectChooseElement, "OM_CannotAcceptParent"); 84ErrorUtilities.VerifyThrowInvalidOperation(!(previousSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\Solution\SolutionFile.cs (5)
23using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 236ErrorUtilities.VerifyThrowInternalRooted(value); 352ErrorUtilities.VerifyThrowInternalRooted(_solutionFile); 539ErrorUtilities.VerifyThrowInternalRooted(solutionFile); 736ErrorUtilities.VerifyThrowInternalRooted(_solutionFile);
Construction\UsingTaskParameterGroupElement.cs (2)
54set => ErrorUtilities.ThrowInvalidOperation("OM_CannotGetSetCondition"); 123ErrorUtilities.VerifyThrowInvalidOperation(parentUsingTask != null, "OM_CannotAcceptParent");
Definition\Project.cs (20)
274ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 368ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 464ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 565ErrorUtilities.ThrowArgument("OM_PartialEvaluationNotSupportedForProject", options.EvaluationStage); 1712ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}"); 1844ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File); 1918ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 1942ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 1977ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 2282ErrorUtilities.ThrowInvalidOperation("OM_NotEvaluatedBecauseShouldEvaluateForDesignTimeIsFalse", nameof(ItemsIgnoringCondition)); 2324ErrorUtilities.VerifyThrowInvalidOperation((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0, "OM_MustSetRecordDuplicateInputs"); 2982ErrorUtilities.VerifyThrowInvalidOperation(property?.IsReservedProperty != true, "OM_ReservedName", name); 2983ErrorUtilities.VerifyThrowInvalidOperation(property?.IsGlobalProperty != true, "OM_GlobalProperty", name); 3206ErrorUtilities.VerifyThrowInvalidOperation(!property.IsReservedProperty, "OM_ReservedName", property.Name); 3207ErrorUtilities.VerifyThrowInvalidOperation(!property.IsGlobalProperty, "OM_GlobalProperty", property.Name); 3208ErrorUtilities.VerifyThrowArgument(property.Xml.Parent != null, "OM_IncorrectObjectAssociation", "ProjectProperty", "Project"); 3268ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project"); 3449ErrorUtilities.VerifyThrowInvalidOperation(!ThrowInsteadOfSplittingItemElement, "OM_CannotSplitItemElementWhenSplittingIsDisabled", itemElement.Location, $"{nameof(Project)}.{nameof(ThrowInsteadOfSplittingItemElement)}"); 3636ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File); 3696ErrorUtilities.VerifyThrowArgument(item.Project == Owner, "OM_IncorrectObjectAssociation", "ProjectItem", "Project");
Definition\ProjectCollection.cs (6)
595ErrorUtilities.ThrowInvalidOperation("UnrecognizedToolsVersion", value, toolsVersionList); 1463ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded"); 1505ErrorUtilities.ThrowInvalidOperation("OM_ProjectXmlCannotBeUnloadedDueToLoadedProjects", projectRootElement.FullPath, conflictingProject.FullPath); 1692ErrorUtilities.VerifyThrowInvalidOperation(existed, "OM_ProjectWasNotLoaded"); 1723ErrorUtilities.VerifyThrowInvalidOperation(ReferenceEquals(project.ProjectCollection, this), "OM_IncorrectObjectAssociation", "Project", "ProjectCollection"); 2068ErrorUtilities.ThrowInvalidOperation("OM_MatchingProjectAlreadyInCollection", existing.FullPath);
Definition\ProjectItem.cs (8)
581ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 582ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name); 583ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 639ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 641ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 648ErrorUtilities.VerifyThrowInvalidOperation(itemDefinitionMetadata == null, "OM_CannotRemoveMetadataOriginatingFromItemDefinition", name); 691ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 787ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
Definition\ProjectItemDefinition.cs (2)
154ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(name), "ItemSpecModifierCannotBeCustomMetadata", name); 155ErrorUtilities.VerifyThrowInvalidOperation(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
Definition\ProjectMetadata.cs (1)
136ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
Definition\ProjectProperty.cs (7)
363ErrorUtilities.VerifyThrowInvalidOperation(!ProjectHasMatchingGlobalProperty(project, xml.Name), "OM_GlobalProperty", xml.Name); 405ErrorUtilities.VerifyThrowInvalidOperation(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive"); 548ErrorUtilities.VerifyThrowInvalidOperation(isGlobalProperty || !ProjectHasMatchingGlobalProperty(project, name), "OM_GlobalProperty", name); 549ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name); 550ErrorUtilities.VerifyThrowArgument(mayBeReserved || !ReservedPropertyNames.IsReservedProperty(name), "OM_ReservedName", name); 591ErrorUtilities.VerifyThrowInvalidOperation(!IsReservedProperty, "OM_ReservedName", _name); 592ErrorUtilities.VerifyThrowInvalidOperation(!IsGlobalProperty, "OM_GlobalProperty", _name);
Definition\ToolsetReader.cs (1)
152ErrorUtilities.ThrowArgument("OM_ConfigurationFileToolsetsNotSupported");
ElementLocation\ElementLocation.cs (1)
254ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(file, nameof(file));
ElementLocation\XmlDocumentWithLocation.cs (1)
409ErrorUtilities.VerifyThrowInvalidOperation(!_loadAsReadOnly.HasValue || !_loadAsReadOnly.Value, "OM_CannotSaveFileLoadedAsReadOnly", _fullPath);
Errors\InternalLoggerException.cs (2)
41ErrorUtilities.ThrowInvalidOperation("InternalLoggerExceptionOnlyThrownByEngine"); 55ErrorUtilities.ThrowInvalidOperation("InternalLoggerExceptionOnlyThrownByEngine");
Evaluation\Context\EvaluationContext.cs (1)
97ErrorUtilities.VerifyThrowArgument(
Evaluation\Evaluator.cs (1)
1840ErrorUtilities.ThrowArgumentOutOfRange(nameof(mode));
Evaluation\Expander.Function.cs (1)
642ErrorUtilities.ThrowArgument("CouldNotDifferentiateBetweenCompatibleMethods", _methodMethodName, args.Length);
Evaluation\IntrinsicFunctions.cs (3)
494ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", runtime, "Runtime", XMakeAttributes.MSBuildRuntimeValues.clr2, XMakeAttributes.MSBuildRuntimeValues.clr4, XMakeAttributes.MSBuildRuntimeValues.currentRuntime, XMakeAttributes.MSBuildRuntimeValues.any); 499ErrorUtilities.ThrowArgument("InvalidTaskHostFactoryParameter", architecture, "Architecture", XMakeAttributes.MSBuildArchitectureValues.x86, XMakeAttributes.MSBuildArchitectureValues.x64, XMakeAttributes.MSBuildArchitectureValues.currentArchitecture, XMakeAttributes.MSBuildArchitectureValues.any); 816ErrorUtilities.ThrowArgument(keyName);
Evaluation\ProjectRootElementCache.cs (3)
15using ErrorUtilities = Microsoft.Build.Shared.ErrorUtilities; 256ErrorUtilities.VerifyThrowInternalRooted(projectFile); 533ErrorUtilities.VerifyThrowInternalRooted(oldFullPathIfAny);
Evaluation\SimpleProjectRootElementCache.cs (1)
43ErrorUtilities.VerifyThrowInternalRooted(projectFile);
Globbing\MSBuildGlob.cs (1)
174ErrorUtilities.VerifyThrowArgumentInvalidPath(globRoot, nameof(globRoot));
Graph\GraphBuilder.cs (1)
274ErrorUtilities.VerifyThrowArgument(entryPoints.Count == 1, "StaticGraphAcceptsSingleSolutionEntryPoint");
Instance\HostServices.cs (2)
141ErrorUtilities.VerifyThrowInvalidOperation(!hasExplicitOutOfProcAffinity || hostObject == null, "InvalidHostObjectOnOutOfProcProject"); 216ErrorUtilities.VerifyThrowInvalidOperation(nodeAffinity == NodeAffinity.InProc, "InvalidAffinityForProjectWithHostObject");
Instance\ImmutableProjectCollections\ImmutableElementCollectionConverter.cs (2)
151ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, count); 168ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _projectElements.Count);
Instance\ImmutableProjectCollections\ImmutableGlobalPropertiesCollectionConverter.cs (2)
88ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _globalProperties.Count); 207ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _parent._globalProperties.Count);
Instance\ImmutableProjectCollections\ImmutableItemDefinitionsListConverter.cs (1)
87ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, Count);
Instance\ImmutableProjectCollections\ImmutableItemDictionary.cs (1)
185ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, _list.Count);
Instance\ImmutableProjectCollections\LazyStringValuedList.cs (1)
56ErrorUtilities.VerifyCollectionCopyToArguments(array, arrayIndex, items.Count);
Instance\ProjectInstance.cs (8)
314ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 659ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 675ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 688ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(fullPath, nameof(fullPath)); 1250ErrorUtilities.ThrowInvalidOperation("OM_PartialEvaluationMemberUnavailable", memberName, _evaluationStage, requiredStage); 2700ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(toolsVersion, nameof(toolsVersion)); 2838ErrorUtilities.ThrowInvalidOperation("OM_ProjectInstanceImmutable"); 3259ErrorUtilities.VerifyThrowArgumentLengthIfNotNull(explicitToolsVersion, "toolsVersion");
Instance\ProjectItemInstance.cs (1)
740ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(itemTypeToUse), "OM_ReservedName", itemTypeToUse);
Instance\ProjectMetadataInstance.cs (2)
247ErrorUtilities.ThrowArgument("OM_ReservedName", name); 264ErrorUtilities.VerifyThrowArgument(!StringComparer.Ordinal.Equals(reservedName, name), "OM_ReservedName", name);
Instance\ProjectPropertyInstance.cs (2)
328ErrorUtilities.VerifyThrowArgument(!XMakeElements.ReservedItemNames.Contains(name), "OM_ReservedName", name); 329ErrorUtilities.VerifyThrowArgument(mayBeReserved || !ReservedPropertyNames.IsReservedProperty(name), "OM_CannotCreateReservedProperty", name);
Logging\ConsoleLogger.cs (1)
303ErrorUtilities.VerifyThrowInvalidOperation(_consoleLogger != null, "MustCallInitializeBeforeApplyParameter");
Logging\NullCentralLogger.cs (1)
58ErrorUtilities.ThrowInvalidOperation("Should not receive any events other than build started or finished");
src\msbuild\src\Shared\TaskLoggingHelper.cs (8)
206ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "TaskResourcesNotRegistered", TaskName); 210ErrorUtilities.VerifyThrowArgument(resourceString != null, "TaskResourceNotFound", resourceName, TaskName); 321ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message); 374ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 431ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 619ErrorUtilities.ThrowInvalidOperation("LoggingBeforeTaskInitialization", e.Message); 706ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message); 1028ErrorUtilities.VerifyThrowInvalidOperation(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
src\msbuild\src\Shared\TaskLoggingHelperExtension.cs (3)
94ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "TaskResourcesNotRegistered", TaskName); 95ErrorUtilities.VerifyThrowInvalidOperation(TaskSharedResources != null, "TaskResourcesNotRegistered", TaskName); 105ErrorUtilities.VerifyThrowArgument(resourceString != null, "TaskResourceNotFound", resourceName, TaskName);
src\msbuild\src\Shared\TaskParameter.cs (2)
754ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsDerivableItemSpecModifier(metadataName), "CannotChangeItemSpecModifiers", metadataName); 768ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(metadataName), "CannotChangeItemSpecModifiers", metadataName);
Utilities\EngineFileUtilities.cs (1)
210ErrorUtilities.DebugTraceMessage("EngineFileUtilities", $"Expanding wildcard for file spec {filespecEscaped}");
Utilities\XmlUtilities.cs (1)
78ErrorUtilities.ThrowArgument("OM_NameInvalid", name, name[firstInvalidCharLocation]);