25 references to VerifyThrowInvalidOperation
Microsoft.Build (25)
Construction\ProjectMetadataElement.cs (1)
107
ErrorUtilities.
VerifyThrowInvalidOperation
(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
Construction\ProjectPropertyElement.cs (1)
97
ErrorUtilities.
VerifyThrowInvalidOperation
(!XMakeElements.ReservedItemNames.Contains(name) && !ReservedPropertyNames.IsReservedProperty(name), "OM_CannotCreateReservedProperty", name);
Construction\ProjectRootElement.cs (2)
1624
ErrorUtilities.
VerifyThrowInvalidOperation
(!string.IsNullOrEmpty(FullPath), "ValueNotSet", $"{nameof(ProjectRootElement)}.{nameof(FullPath)}");
1637
ErrorUtilities.
VerifyThrowInvalidOperation
(FileSystems.Default.FileExists(path), "FileToReloadFromDoesNotExist", path);
Definition\Project.cs (6)
1809
ErrorUtilities.
VerifyThrowInvalidOperation
(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File);
2932
ErrorUtilities.
VerifyThrowInvalidOperation
(property?.IsReservedProperty != true, "OM_ReservedName", name);
2933
ErrorUtilities.
VerifyThrowInvalidOperation
(property?.IsGlobalProperty != true, "OM_GlobalProperty", name);
3156
ErrorUtilities.
VerifyThrowInvalidOperation
(!property.IsReservedProperty, "OM_ReservedName", property.Name);
3157
ErrorUtilities.
VerifyThrowInvalidOperation
(!property.IsGlobalProperty, "OM_GlobalProperty", property.Name);
3585
ErrorUtilities.
VerifyThrowInvalidOperation
(ReferenceEquals(Xml, otherXml), "OM_CannotModifyEvaluatedObjectInImportedFile", otherXml.Location.File);
Definition\ProjectItem.cs (2)
587
ErrorUtilities.
VerifyThrowInvalidOperation
(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
653
ErrorUtilities.
VerifyThrowInvalidOperation
(itemDefinitionMetadata == null, "OM_CannotRemoveMetadataOriginatingFromItemDefinition", name);
Definition\ProjectItemDefinition.cs (1)
155
ErrorUtilities.
VerifyThrowInvalidOperation
(!XMakeElements.ReservedItemNames.Contains(name), "CannotModifyReservedItemMetadata", name);
Definition\ProjectProperty.cs (4)
363
ErrorUtilities.
VerifyThrowInvalidOperation
(!ProjectHasMatchingGlobalProperty(project, xml.Name), "OM_GlobalProperty", xml.Name);
548
ErrorUtilities.
VerifyThrowInvalidOperation
(isGlobalProperty || !ProjectHasMatchingGlobalProperty(project, name), "OM_GlobalProperty", name);
591
ErrorUtilities.
VerifyThrowInvalidOperation
(!IsReservedProperty, "OM_ReservedName", _name);
592
ErrorUtilities.
VerifyThrowInvalidOperation
(!IsGlobalProperty, "OM_GlobalProperty", _name);
ElementLocation\XmlDocumentWithLocation.cs (1)
407
ErrorUtilities.
VerifyThrowInvalidOperation
(!_loadAsReadOnly.HasValue || !_loadAsReadOnly.Value, "OM_CannotSaveFileLoadedAsReadOnly", _fullPath);
TaskLoggingHelper.cs (5)
206
ErrorUtilities.
VerifyThrowInvalidOperation
(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName);
374
ErrorUtilities.
VerifyThrowInvalidOperation
(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
431
ErrorUtilities.
VerifyThrowInvalidOperation
(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
706
ErrorUtilities.
VerifyThrowInvalidOperation
(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
1057
ErrorUtilities.
VerifyThrowInvalidOperation
(BuildEngine != null, "LoggingBeforeTaskInitialization", message);
TaskLoggingHelperExtension.cs (2)
94
ErrorUtilities.
VerifyThrowInvalidOperation
(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName);
95
ErrorUtilities.
VerifyThrowInvalidOperation
(TaskSharedResources != null, "Shared.TaskResourcesNotRegistered", TaskName);