208 references to ErrorUtilities
Microsoft.Build.Tasks.Core (201)
AppConfig\BindingRedirect.cs (4)
41ErrorUtilities.VerifyThrowArgument(!String.IsNullOrEmpty(oldVersion), "AppConfig.BindingRedirectMissingOldVersion"); 66ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidOldVersionAttribute", e.Message); 72ErrorUtilities.VerifyThrowArgument(!String.IsNullOrEmpty(newVersionAttribute), "AppConfig.BindingRedirectMissingNewVersion"); 80ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidNewVersionAttribute", e.Message);
AppConfig\DependentAssembly.cs (1)
99ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidAssemblyIdentityFields");
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
130ErrorUtilities.VerifyThrow(FileSystems.Default.FileExists(_assemblyFolderConfigFile),
AssemblyDependency\AssemblyInformation.cs (1)
73ErrorUtilities.VerifyThrowArgumentNull(sourceFile);
AssemblyDependency\GenerateBindingRedirects.cs (2)
195ErrorUtilities.VerifyThrow(runtimeNode != null, "This should not be called if the \"runtime\" node is missing."); 361ErrorUtilities.VerifyThrow(SuggestedRedirects?.Length > 0, "This should not be called if there is no suggested redirect.");
AssemblyDependency\GlobalAssemblyCache.cs (5)
59ErrorUtilities.VerifyThrowArgumentNull(assemblyName); 60ErrorUtilities.VerifyThrow(assemblyName.FullName != null, "Got a null assembly name fullname."); 120ErrorUtilities.VerifyThrowArgumentNull(targetedRuntime); 181ErrorUtilities.VerifyThrowArgumentNull(strongName); 189ErrorUtilities.VerifyThrow(hr == NativeMethodsShared.S_OK, "CreateAssemblyCache failed, hr {0}", hr);
AssemblyDependency\Node\OutOfProcRarClient.cs (2)
89ErrorUtilities.ThrowInternalError($"Received unexpected log event type {logMessagePacket.Type}"); 96ErrorUtilities.ThrowInternalError($"Received unexpected packet type {packet.Type}");
AssemblyDependency\Node\OutOfProcRarNodeEndpoint.cs (1)
117ErrorUtilities.ThrowInternalError($"Received unexpected packet type {packetType}");
AssemblyDependency\Reference.cs (4)
621ErrorUtilities.VerifyThrow( 623ErrorUtilities.VerifyThrow( 747ErrorUtilities.VerifyThrow(remappedFrom.Immutable, " Remapped from is NOT immutable"); 748ErrorUtilities.VerifyThrow(remappedTo.Immutable, " Remapped to is NOT immutable");
AssemblyDependency\ReferenceTable.cs (8)
427ErrorUtilities.VerifyThrow(assemblyName.Name != null, "Got an empty assembly name."); 452ErrorUtilities.VerifyThrow(assemblyName.Name != null, "Got an empty assembly name."); 1677ErrorUtilities.VerifyThrow(dependencyIterations < maxIterations, "Maximum iterations exceeded while looking for dependencies."); 1696ErrorUtilities.VerifyThrow(moreResolvableIterations < maxIterations, "Maximum iterations exceeded while looking for resolvable references."); 2352ErrorUtilities.VerifyThrow(assemblyReference0.assemblyName.FullName != null, "Got a null assembly name fullname. (0)"); 2353ErrorUtilities.VerifyThrow(assemblyReference1.assemblyName.FullName != null, "Got a null assembly name fullname. (1)"); 2558ErrorUtilities.VerifyThrowInternalNull(a); 2559ErrorUtilities.VerifyThrowInternalNull(b);
AssemblyDependency\ResolveAssemblyReference.cs (8)
347ErrorUtilities.VerifyThrowArgumentNull(value, "TargetFrameworkSubsets"); 497ErrorUtilities.VerifyThrowArgumentNull(value, "InstalledAssemblySubsetTables"); 528ErrorUtilities.VerifyThrowArgumentNull(value, "FullFrameworkAssemblyTables"); 880ErrorUtilities.VerifyThrowArgumentNull(value, "FullTargetFrameworkSubsetNames"); 898ErrorUtilities.VerifyThrowArgumentNull(value, "profileName"); 917ErrorUtilities.VerifyThrowArgumentNull(value, "FullFrameworkFolders"); 1372ErrorUtilities.VerifyThrowInternalNull(conflictCandidate); 1802ErrorUtilities.VerifyThrowArgumentNull(reference);
AssemblyFolder.cs (1)
57ErrorUtilities.ThrowInternalError("AssemblyFolder.AddFoldersFromRegistryKey expected a known hive.");
AssemblyFoldersFromConfig.cs (2)
31ErrorUtilities.VerifyThrowArgumentNull(configFile); 32ErrorUtilities.VerifyThrowArgumentNull(targetRuntimeVersion);
AssemblyRegistrationCache.cs (3)
34ErrorUtilities.VerifyThrow(_assemblies.Count == _typeLibraries.Count, "Internal assembly and type library lists should have the same number of entries in AssemblyRegistrationCache"); 53ErrorUtilities.VerifyThrow((index >= 0) && (index < _assemblies.Count), "Invalid index in the call to AssemblyRegistrationCache.GetEntry"); 67ErrorUtilities.VerifyThrowArgumentNull(translator);
AssemblyResources.cs (2)
27ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name); 43ErrorUtilities.VerifyThrow(resource != null, "Missing resource '{0}'", name);
CodeTaskFactory.cs (2)
363ErrorUtilities.VerifyThrowArgumentNull(task); 861ErrorUtilities.ThrowInternalError("Cached assembly entry has no file path in out-of-process mode");
CombinePath.cs (1)
38ErrorUtilities.VerifyThrowArgumentNull(_paths, nameof(Paths));
CommandLineBuilderExtension.cs (1)
236ErrorUtilities.VerifyThrow(
CommunicationsUtilities.cs (6)
260ErrorUtilities.VerifyThrow( 478ErrorUtilities.VerifyThrow(bytes.Length == 4, "Int should be 4 bytes"); 694ErrorUtilities.VerifyThrow(taskHostParameters.Runtime != null, "Should always have an explicit runtime when we call this method."); 695ErrorUtilities.VerifyThrow(taskHostParameters.Architecture != null, "Should always have an explicit architecture when we call this method."); 711ErrorUtilities.ThrowInternalErrorUnreachable(); 745ErrorUtilities.ThrowInternalErrorUnreachable();
ComReference.cs (1)
429ErrorUtilities.VerifyThrow(bufferSize <= int.MaxValue / 2, "Buffer size approaching int.MaxValue");
ComReferenceInfo.cs (1)
137ErrorUtilities.VerifyThrowArgumentNull(path);
ConvertToAbsolutePath.cs (1)
30ErrorUtilities.VerifyThrowArgumentNull(_paths, nameof(Paths));
Copy.cs (1)
849ErrorUtilities.VerifyThrowArgumentLength(sourceFolder.ItemSpec);
CreateManifestResourceName.cs (4)
56ErrorUtilities.VerifyThrowArgumentNull(_resourceFiles, nameof(ResourceFiles)); 310ErrorUtilities.VerifyThrowArgumentNull(subName); 348ErrorUtilities.VerifyThrowArgumentNull(name); 380ErrorUtilities.VerifyThrowArgumentNull(name);
Delete.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_files, nameof(Files));
ExtensionFoldersRegistryKey.cs (2)
19ErrorUtilities.VerifyThrowArgumentNull(registryKey); 20ErrorUtilities.VerifyThrowArgumentNull(targetFrameworkVersion);
FileIO\WriteLinesToFile.cs (1)
74ErrorUtilities.VerifyThrowArgumentLength(File.ItemSpec);
FileState.cs (2)
131ErrorUtilities.ThrowInternalErrorUnreachable(); 310ErrorUtilities.VerifyThrowArgumentLength(value);
FindAppConfigFile.cs (2)
40ErrorUtilities.VerifyThrowArgumentNull(_primaryList, nameof(PrimaryList)); 54ErrorUtilities.VerifyThrowArgumentNull(_secondaryList, nameof(SecondaryList));
FindInList.cs (1)
31ErrorUtilities.VerifyThrowArgumentNull(_list, nameof(List));
GenerateResource.cs (10)
620ErrorUtilities.VerifyThrowInternalNull(resGenCommand); 811ErrorUtilities.VerifyThrow(processType == typeof(ProcessResourceFiles), "Somehow got a wrong and possibly incompatible type for ProcessResourceFiles."); 1148ErrorUtilities.VerifyThrow(inputsToProcess.Count != 0, "There should be resource files to process"); 1149ErrorUtilities.VerifyThrow(inputsToProcess.Count == outputsToProcess.Count, "The number of inputs and outputs should be equal"); 1269ErrorUtilities.VerifyThrow(inputsToProcess.Count == 1 && outputsToProcess.Count == 1, "For STR, there should only be one input and one output."); 2102ErrorUtilities.VerifyThrow(OutputResources != null && OutputResources.Length != 0, "Should be at least one output resource"); 2186ErrorUtilities.VerifyThrow(_cache != null, "We did not create a cache!"); 2718ErrorUtilities.VerifyThrow(_readers.Count == 1, 2728ErrorUtilities.VerifyThrow(_readers.Count == 1, 4173ErrorUtilities.ThrowArgument("GenerateResource.CouldNotLoadType", name);
GetAssembliesMetadata.cs (1)
71ErrorUtilities.VerifyThrowArgumentNull(value, nameof(AssemblyPaths));
GetAssemblyIdentity.cs (1)
35ErrorUtilities.VerifyThrowArgumentNull(_assemblyFiles, nameof(AssemblyFiles));
GetInstalledSDKLocations.cs (2)
71ErrorUtilities.VerifyThrowArgumentNull(value, nameof(TargetPlatformVersion)); 86ErrorUtilities.VerifyThrowArgumentNull(value, nameof(TargetPlatformIdentifier));
GetSDKReferenceFiles.cs (4)
97ErrorUtilities.VerifyThrowArgumentNull(value, nameof(CacheFileFolderPath)); 111ErrorUtilities.VerifyThrowArgumentNull(value, nameof(ResolvedSDKReferences)); 126ErrorUtilities.VerifyThrowArgumentNull(value, nameof(ReferenceExtensions)); 664ErrorUtilities.VerifyThrowArgument(sdkIdentity.Length != 0, "GetSDKReferenceFiles.NoOriginalItemSpec", sdk.ItemSpec);
LogMessagePacketBase.cs (5)
294ErrorUtilities.VerifyThrow(nodeBuildEvent != null, "nodeBuildEvent was null"); 381ErrorUtilities.VerifyThrow(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 422ErrorUtilities.VerifyThrow(_eventType != LoggingEventType.CustomEvent, "_eventType should not be a custom event"); 443ErrorUtilities.VerifyThrow(_buildEvent is not null, "Not Supported LoggingEventType {0}", _eventType.ToString()); 771ErrorUtilities.ThrowInternalError("Not Supported LoggingEventType {0}", eventType.ToString());
MakeDir.cs (1)
25ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
MSBuild.cs (4)
165ErrorUtilities.ThrowInternalError("Unexpected case {0}", _skipNonExistentProjects); 169ErrorUtilities.ThrowInternalErrorUnreachable(); 355ErrorUtilities.VerifyThrow(skipNonExistProjects == SkipNonExistentProjectsBehavior.Error, "skipNonexistentProjects has unexpected value {0}", skipNonExistProjects); 691ErrorUtilities.VerifyThrowArgument(ConversionUtilities.CanConvertStringToBool(value), "MSBuild.InvalidSkipNonexistentProjectValue");
NodePacketFactory.cs (3)
55ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packetType); 70ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packetType); 84ErrorUtilities.ThrowInternalError("No packet handler for type {0}", packet.Type);
PrintLineDebugger.cs (4)
32ErrorUtilities.VerifyThrowInternalNull(propertyInfo); 83ErrorUtilities.ThrowInternalError("Cannot set a new writer over an old writer. Remove the old one first"); 105ErrorUtilities.ThrowInternalError("Cannot unset an already null writer"); 169ErrorUtilities.ThrowInternalError($"The writer from this {nameof(PrintLineDebugger)} instance differs from the static writer.");
RedistList.cs (4)
295ErrorUtilities.VerifyThrowArgumentNull(frameworkDirectory); 433ErrorUtilities.VerifyThrowArgumentNull(assemblyName); 1035ErrorUtilities.VerifyThrowArgumentNull(subsetToSearchFor); 1059ErrorUtilities.VerifyThrowArgumentNull(frameworkDirectory);
RegisterAssembly.cs (3)
41ErrorUtilities.VerifyThrowArgumentNull(_assemblies, nameof(Assemblies)); 195ErrorUtilities.VerifyThrowArgumentNull(assemblyToResolve); 211ErrorUtilities.VerifyThrowArgumentNull(typeLibPath);
RemoveDir.cs (1)
35ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
ResGen.cs (3)
366ErrorUtilities.VerifyThrow(!IsNullOrEmpty(InputFiles), "If InputFiles is empty, the task should have returned before reaching this point"); 405ErrorUtilities.VerifyThrow(!IsNullOrEmpty(InputFiles), "If InputFiles is empty, the task should have returned before reaching this point"); 474ErrorUtilities.VerifyThrow(!IsNullOrEmpty(InputFiles), "If InputFiles is empty, the task should have returned before reaching this point");
ResolveComReference.cs (1)
1042ErrorUtilities.ThrowInternalError("Unknown wrapper type!");
ResolveComReferenceCache.cs (2)
44ErrorUtilities.VerifyThrowArgumentNull(tlbImpPath); 45ErrorUtilities.VerifyThrowArgumentNull(axImpPath);
ResolveNativeReference.cs (2)
50ErrorUtilities.VerifyThrowArgumentNull(_nativeReferences, nameof(NativeReferences)); 61ErrorUtilities.VerifyThrowArgumentNull(_additionalSearchPaths, nameof(AdditionalSearchPaths));
ResolveProjectBase.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_projectReferences, nameof(ProjectReferences));
ResolveSDKReference.cs (5)
128ErrorUtilities.VerifyThrowArgumentNull(value, nameof(SDKReferences)); 144ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InstalledSDKs)); 733ErrorUtilities.VerifyThrowArgumentNull(taskItem); 734ErrorUtilities.VerifyThrowArgumentLength(sdkName); 735ErrorUtilities.VerifyThrowArgumentLength(sdkVersion);
ResourceUtilities.cs (6)
39ErrorUtilities.VerifyThrowInternalNull(message); 428ErrorUtilities.ThrowInternalError( 454ErrorUtilities.ThrowInternalError("The resource string \"" + resourceName + "\" was not found."); 462ErrorUtilities.ThrowInternalError(e.Message); 469ErrorUtilities.ThrowInternalError(e.Message); 476ErrorUtilities.ThrowInternalError(e.Message);
SGen.cs (2)
153ErrorUtilities.VerifyThrowArgumentNull(value, nameof(BuildAssemblyName)); 164ErrorUtilities.VerifyThrowArgumentNull(value, nameof(BuildAssemblyPath));
StreamMappedString.cs (5)
195ErrorUtilities.VerifyThrow(originalPageNumber != _currentPageNumber, "Expected a new page."); 290ErrorUtilities.VerifyThrow(_charactersRead != _pageSize, "Attempt to append to non-last page."); 305ErrorUtilities.VerifyThrow(_priorPage != null, "There is no last character in the stream."); 389ErrorUtilities.VerifyThrow(charactersExtracted > 0, "Expected non-zero extraction count."); 404ErrorUtilities.VerifyThrow(page >= _currentPageNumber - 1 && page <= _currentPageNumber, "Could not get character count for this page.");
StrongNameUtils.cs (1)
138ErrorUtilities.VerifyThrowArgumentNull(assemblyPath);
SystemState.cs (1)
171ErrorUtilities.VerifyThrowArgumentNull(translator);
TaskLoggingHelperExtension.cs (4)
93ErrorUtilities.VerifyThrowArgumentNull(resourceName); 94ErrorUtilities.VerifyThrowInvalidOperation(TaskResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 95ErrorUtilities.VerifyThrowInvalidOperation(TaskSharedResources != null, "Shared.TaskResourcesNotRegistered", TaskName); 105ErrorUtilities.VerifyThrowArgument(resourceString != null, "Shared.TaskResourceNotFound", resourceName, TaskName);
TaskParameter.cs (12)
117ErrorUtilities.VerifyThrow( 154ErrorUtilities.ThrowInternalErrorUnreachable(); 189ErrorUtilities.ThrowInternalErrorUnreachable(); 260ErrorUtilities.ThrowInternalErrorUnreachable(); 635ErrorUtilities.VerifyThrowInternalNull(_escapedItemSpec); 734ErrorUtilities.VerifyThrowArgumentLength(metadataName); 738ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsDerivableItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 751ErrorUtilities.VerifyThrowArgumentNull(metadataName); 752ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 774ErrorUtilities.VerifyThrowArgumentNull(destinationItem); 957ErrorUtilities.VerifyThrowInternalNull(_escapedItemSpec); 958ErrorUtilities.VerifyThrowInternalNull(_customEscapedMetadata);
tokenCharReader.cs (2)
267ErrorUtilities.VerifyThrow(originalPosition != _position, "Expected position to be incremented."); 274ErrorUtilities.VerifyThrow(originalPosition != _position, "Expected position to be incremented.");
UnregisterAssembly.cs (1)
153ErrorUtilities.VerifyThrowArgumentNull(typeLibPath);
Unzip.cs (1)
190ErrorUtilities.VerifyThrowInvalidOperation(fullDestinationPath.StartsWith(fullDestinationDirectoryPath, FileUtilities.PathComparison), "Unzip.ZipSlipExploit", fullDestinationPath);
WinMDExp.cs (9)
39ErrorUtilities.VerifyThrowArgumentNull(value, nameof(References)); 53ErrorUtilities.VerifyThrowArgumentNull(value, nameof(DisabledWarnings)); 67ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InputDocumentationFile)); 81ErrorUtilities.VerifyThrowArgumentNull(value, nameof(OutputDocumentationFile)); 95ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InputPDBFile)); 109ErrorUtilities.VerifyThrowArgumentNull(value, nameof(OutputPDBFile)); 124ErrorUtilities.VerifyThrowArgumentNull(value, nameof(WinMDModule)); 139ErrorUtilities.VerifyThrowArgumentNull(value, nameof(OutputWindowsMetadataFile)); 181ErrorUtilities.VerifyThrowArgumentNull(value, nameof(AssemblyUnificationPolicy));
XamlTaskFactory\CommandLineGenerator.cs (4)
45ErrorUtilities.VerifyThrowArgumentNull(rule); 46ErrorUtilities.VerifyThrowArgumentNull(parameterValues); 51ErrorUtilities.VerifyThrow(success, "Unable to parse specified file or contents."); 266ErrorUtilities.ThrowInternalError("InternalError");
XamlTaskFactory\CommandLineToolSwitch.cs (8)
243ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.Boolean, "InvalidType", TypeBoolean); 249ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.Boolean, "InvalidType", TypeBoolean); 261ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.Integer, "InvalidType", TypeInteger); 267ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.Integer, "InvalidType", TypeInteger); 280ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.StringArray, "InvalidType", TypeStringArray); 286ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.StringArray, "InvalidType", TypeStringArray); 299ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.ITaskItemArray, "InvalidType", TypeITaskItemArray); 305ErrorUtilities.VerifyThrow(Type == CommandLineToolSwitchType.ITaskItemArray, "InvalidType", TypeITaskItemArray);
XamlTaskFactory\RelationsParser.cs (1)
250ErrorUtilities.VerifyThrow(xmlDocument != null, nameof(xmlDocument));
XamlTaskFactory\TaskGenerator.cs (1)
579ErrorUtilities.VerifyThrow(value != null, "NullValue", property);
XamlTaskFactory\TaskParser.cs (4)
93ErrorUtilities.VerifyThrowArgumentLength(contentOrFile); 94ErrorUtilities.VerifyThrowArgumentLength(desiredRule); 190ErrorUtilities.VerifyThrowArgumentNull(reader); 191ErrorUtilities.VerifyThrowArgumentLength(desiredRule);
XamlTaskFactory\XamlTaskFactory.cs (3)
102ErrorUtilities.VerifyThrowArgumentNull(taskName); 103ErrorUtilities.VerifyThrowArgumentNull(taskParameters); 237ErrorUtilities.VerifyThrowArgumentNull(task);
XMakeAttributes.cs (4)
162ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 206ErrorUtilities.VerifyThrow(runtimeA != String.Empty && runtimeB != String.Empty, "We should never get an empty string passed to this method"); 279ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method"); 346ErrorUtilities.VerifyThrow(architectureA != String.Empty && architectureB != String.Empty, "We should never get an empty string passed to this method");
XslTransformation.cs (3)
80ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 107ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 515ErrorUtilities.ThrowInternalErrorUnreachable();
Microsoft.Build.Tasks.UnitTests (7)
ErrorUtilities_Tests.cs (7)
19ErrorUtilities.VerifyThrow(false, "msbuild rules"); 34ErrorUtilities.VerifyThrow(true, "msbuild rules"); 41ErrorUtilities.VerifyThrow(true, "blah"); 48ErrorUtilities.VerifyThrow(true, "{0}", "a"); 55ErrorUtilities.VerifyThrow(true, "{0}{1}", "a", "b"); 62ErrorUtilities.VerifyThrow(true, "{0}{1}{2}", "a", "b", "c"); 69ErrorUtilities.VerifyThrow(true, "{0}{1}{2}{3}", "a", "b", "c", "d");