50 references to VerifyThrowInvalidOperation
Microsoft.Build (50)
BackEnd\BuildManager\BuildManager.cs (2)
728
ErrorUtilities.
VerifyThrowInvalidOperation
(NativeMethodsShared.ProcessorArchitecture == NativeMethodsShared.ProcessorArchitectures.X64, "ReportFileAccessesX64Only");
2115
ErrorUtilities.
VerifyThrowInvalidOperation
(_buildManagerState == requiredState, exceptionResouorce);
BackEnd\BuildManager\BuildSubmission.cs (1)
69
ErrorUtilities.
VerifyThrowInvalidOperation
(!IsCompleted, "SubmissionAlreadyComplete");
Construction\ProjectChooseElement.cs (1)
107
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectElementContainer.cs (5)
675
ErrorUtilities.
VerifyThrowInvalidOperation
(Parent != null || ContainingProject == this, "OM_ParentNotParented");
676
ErrorUtilities.
VerifyThrowInvalidOperation
(reference == null || reference.Parent == this, "OM_ReferenceDoesNotHaveThisParent");
677
ErrorUtilities.
VerifyThrowInvalidOperation
(child.Parent == null, "OM_NodeAlreadyParented");
678
ErrorUtilities.
VerifyThrowInvalidOperation
(child.ContainingProject == ContainingProject, "OM_MustBeSameProject");
698
ErrorUtilities.
VerifyThrowInvalidOperation
(ancestor != element, "OM_SelfAncestor");
Construction\ProjectExtensionsElement.cs (1)
205
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectImportElement.cs (1)
178
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement || parent is ProjectImportGroupElement, "OM_CannotAcceptParent");
Construction\ProjectImportGroupElement.cs (1)
89
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectItemDefinitionElement.cs (1)
115
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectItemDefinitionGroupElement, "OM_CannotAcceptParent");
Construction\ProjectItemDefinitionGroupElement.cs (1)
80
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectItemElement.cs (6)
189
ErrorUtilities.
VerifyThrowInvalidOperation
(Parent == null || Parent.Parent is ProjectTargetElement || Parent.Parent is ProjectRootElement, "OM_NoMatchOnMetadataOutsideTargets");
231
ErrorUtilities.
VerifyThrowInvalidOperation
(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepMetadataOutsideTargets");
252
ErrorUtilities.
VerifyThrowInvalidOperation
(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoRemoveMetadataOutsideTargets");
273
ErrorUtilities.
VerifyThrowInvalidOperation
(Parent == null || Parent.Parent is ProjectTargetElement, "OM_NoKeepDuplicatesOutsideTargets");
475
ErrorUtilities.
VerifyThrowInvalidOperation
(parent.Parent is ProjectTargetElement || (Include.Length > 0 || Update.Length > 0 || Remove.Length > 0), "OM_ItemsOutsideTargetMustHaveIncludeOrUpdateOrRemove");
476
ErrorUtilities.
VerifyThrowInvalidOperation
(parent.Parent is ProjectRootElement || parent.Parent is ProjectTargetElement || parent.Parent is ProjectWhenElement || parent.Parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectItemGroupElement.cs (1)
177
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectMetadataElement.cs (1)
168
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectItemElement || parent is ProjectItemDefinitionElement, "OM_CannotAcceptParent");
Construction\ProjectOnErrorElement.cs (1)
89
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectTargetElement, "OM_CannotAcceptParent");
Construction\ProjectOtherwiseElement.cs (2)
101
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectChooseElement, "OM_CannotAcceptParent");
102
ErrorUtilities.
VerifyThrowInvalidOperation
(!(nextSibling is ProjectWhenElement) && !(previousSibling is ProjectOtherwiseElement) && !(nextSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\ProjectOutputElement.cs (1)
170
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectTaskElement, "OM_CannotAcceptParent");
Construction\ProjectPropertyElement.cs (1)
134
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectPropertyGroupElement, "OM_CannotAcceptParent");
Construction\ProjectPropertyGroupElement.cs (1)
110
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectRootElement.cs (1)
1516
ErrorUtilities.
VerifyThrowInvalidOperation
(_projectFileLocation != null, "OM_MustSetFileNameBeforeSave");
Construction\ProjectSdkElement.cs (1)
82
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectTargetElement.cs (1)
417
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectTaskElement.cs (1)
427
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectTargetElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskBodyElement.cs (1)
160
ErrorUtilities.
VerifyThrowInvalidOperation
(parentUsingTask != null, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskElement.cs (1)
268
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectRootElement, "OM_CannotAcceptParent");
Construction\ProjectUsingTaskParameterElement.cs (1)
193
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is UsingTaskParameterGroupElement, "OM_CannotAcceptParent");
Construction\ProjectWhenElement.cs (2)
82
ErrorUtilities.
VerifyThrowInvalidOperation
(parent is ProjectChooseElement, "OM_CannotAcceptParent");
83
ErrorUtilities.
VerifyThrowInvalidOperation
(!(previousSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\UsingTaskParameterGroupElement.cs (1)
129
ErrorUtilities.
VerifyThrowInvalidOperation
(parentUsingTask != null, "OM_CannotAcceptParent");
Definition\Project.cs (1)
2277
ErrorUtilities.
VerifyThrowInvalidOperation
((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0, "OM_MustSetRecordDuplicateInputs");
Definition\ProjectCollection.cs (2)
1351
ErrorUtilities.
VerifyThrowInvalidOperation
(existed, "OM_ProjectWasNotLoaded");
1580
ErrorUtilities.
VerifyThrowInvalidOperation
(existed, "OM_ProjectWasNotLoaded");
Definition\ProjectItem.cs (4)
588
ErrorUtilities.
VerifyThrowInvalidOperation
(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
646
ErrorUtilities.
VerifyThrowInvalidOperation
(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
696
ErrorUtilities.
VerifyThrowInvalidOperation
(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
792
ErrorUtilities.
VerifyThrowInvalidOperation
(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
Definition\ProjectMetadata.cs (1)
136
ErrorUtilities.
VerifyThrowInvalidOperation
(_xml.Parent?.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
Definition\ProjectProperty.cs (1)
405
ErrorUtilities.
VerifyThrowInvalidOperation
(_xml.Parent?.Parent != null, "OM_ObjectIsNoLongerActive");
Instance\HostServices.cs (2)
142
ErrorUtilities.
VerifyThrowInvalidOperation
(!hasExplicitOutOfProcAffinity || hostObject == null, "InvalidHostObjectOnOutOfProcProject");
217
ErrorUtilities.
VerifyThrowInvalidOperation
(nodeAffinity == NodeAffinity.InProc, "InvalidAffinityForProjectWithHostObject");
Logging\ConsoleLogger.cs (1)
338
ErrorUtilities.
VerifyThrowInvalidOperation
(_consoleLogger != null, "MustCallInitializeBeforeApplyParameter");