196 references to ErrorUtilities
Microsoft.Build.Tasks.Core (191)
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)
76ErrorUtilities.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)
60ErrorUtilities.VerifyThrowArgumentNull(assemblyName); 61ErrorUtilities.VerifyThrow(assemblyName.FullName != null, "Got a null assembly name fullname."); 121ErrorUtilities.VerifyThrowArgumentNull(targetedRuntime); 182ErrorUtilities.VerifyThrowArgumentNull(strongName); 189ErrorUtilities.VerifyThrow(hr == HRESULT.S_OK, $"CreateAssemblyCache failed, hr {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 '{name}'"); 43ErrorUtilities.VerifyThrow(resource != null, $"Missing resource '{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(
ComReference.cs (1)
424ErrorUtilities.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)
855ErrorUtilities.VerifyThrowArgumentLength(sourceFolder.ItemSpec);
CreateManifestResourceName.cs (4)
56ErrorUtilities.VerifyThrowArgumentNull(_resourceFiles, nameof(ResourceFiles)); 314ErrorUtilities.VerifyThrowArgumentNull(subName); 352ErrorUtilities.VerifyThrowArgumentNull(name); 384ErrorUtilities.VerifyThrowArgumentNull(name);
Delete.cs (1)
33ErrorUtilities.VerifyThrowArgumentNull(_files, nameof(Files));
ExtensionFoldersRegistryKey.cs (2)
19ErrorUtilities.VerifyThrowArgumentNull(registryKey); 20ErrorUtilities.VerifyThrowArgumentNull(targetFrameworkVersion);
FileIO\WriteLinesToFile.cs (1)
93ErrorUtilities.VerifyThrowArgumentLength(File.ItemSpec);
FileState.cs (2)
139ErrorUtilities.ThrowInternalErrorUnreachable(); 320ErrorUtilities.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, 2727ErrorUtilities.VerifyThrow(_readers.Count == 1, 4171ErrorUtilities.ThrowArgument("GenerateResource.CouldNotLoadType", name);
GetAssembliesMetadata.cs (1)
71ErrorUtilities.VerifyThrowArgumentNull(value, nameof(AssemblyPaths));
GetAssemblyIdentity.cs (1)
39ErrorUtilities.VerifyThrowArgumentNull(_assemblyFiles, nameof(AssemblyFiles));
GetInstalledSDKLocations.cs (2)
75ErrorUtilities.VerifyThrowArgumentNull(value, nameof(TargetPlatformVersion)); 90ErrorUtilities.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 {_eventType}"); 771ErrorUtilities.ThrowInternalError($"Not Supported LoggingEventType {eventType}");
MakeDir.cs (1)
25ErrorUtilities.VerifyThrowArgumentNull(_directories, nameof(Directories));
MSBuild.cs (4)
165ErrorUtilities.ThrowInternalError($"Unexpected case {_skipNonExistentProjects}"); 169ErrorUtilities.ThrowInternalErrorUnreachable(); 355ErrorUtilities.VerifyThrow(skipNonExistProjects == SkipNonExistentProjectsBehavior.Error, $"skipNonexistentProjects has unexpected value {skipNonExistProjects}"); 691ErrorUtilities.VerifyThrowArgument(ConversionUtilities.CanConvertStringToBool(value), "MSBuild.InvalidSkipNonexistentProjectValue");
NodePacketFactory.cs (3)
52ErrorUtilities.VerifyThrow( 65ErrorUtilities.VerifyThrow( 77ErrorUtilities.VerifyThrow(
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($"Invalid resource parameter type, was {param.GetType().FullName}"); 452ErrorUtilities.ThrowInternalError("The resource string \"" + resourceName + "\" was not found."); 460ErrorUtilities.ThrowInternalError(e.Message); 467ErrorUtilities.ThrowInternalError(e.Message); 474ErrorUtilities.ThrowInternalError(e.Message);
SGen.cs (2)
155ErrorUtilities.VerifyThrowArgumentNull(value, nameof(BuildAssemblyName)); 166ErrorUtilities.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)
134ErrorUtilities.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( 153ErrorUtilities.ThrowInternalErrorUnreachable(); 188ErrorUtilities.ThrowInternalErrorUnreachable(); 259ErrorUtilities.ThrowInternalErrorUnreachable(); 634ErrorUtilities.VerifyThrowInternalNull(_escapedItemSpec); 733ErrorUtilities.VerifyThrowArgumentLength(metadataName); 737ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsDerivableItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 750ErrorUtilities.VerifyThrowArgumentNull(metadataName); 751ErrorUtilities.VerifyThrowArgument(!ItemSpecModifiers.IsItemSpecModifier(metadataName), "Shared.CannotChangeItemSpecModifiers", metadataName); 773ErrorUtilities.VerifyThrowArgumentNull(destinationItem); 956ErrorUtilities.VerifyThrowInternalNull(_escapedItemSpec); 957ErrorUtilities.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.Value.StartsWith(fullDestinationDirectoryPath, FileUtilities.PathComparison), "Unzip.ZipSlipExploit", fullDestinationPath);
WinMDExp.cs (9)
40ErrorUtilities.VerifyThrowArgumentNull(value, nameof(References)); 54ErrorUtilities.VerifyThrowArgumentNull(value, nameof(DisabledWarnings)); 68ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InputDocumentationFile)); 82ErrorUtilities.VerifyThrowArgumentNull(value, nameof(OutputDocumentationFile)); 96ErrorUtilities.VerifyThrowArgumentNull(value, nameof(InputPDBFile)); 110ErrorUtilities.VerifyThrowArgumentNull(value, nameof(OutputPDBFile)); 125ErrorUtilities.VerifyThrowArgumentNull(value, nameof(WinMDModule)); 140ErrorUtilities.VerifyThrowArgumentNull(value, nameof(OutputWindowsMetadataFile)); 182ErrorUtilities.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);
XslTransformation.cs (3)
80ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 107ErrorUtilities.VerifyThrowArgumentNull(_outputPaths, "OutputPath"); 521ErrorUtilities.ThrowInternalErrorUnreachable();
Microsoft.Build.Tasks.UnitTests (5)
ErrorUtilities_Tests.cs (5)
17ErrorUtilities.VerifyThrow(false, "msbuild rules"); 27ErrorUtilities.VerifyThrow(true, "msbuild rules"); 34ErrorUtilities.VerifyThrow(true, $"message {FormatSideEffect(ref formatted)}"); 44ErrorUtilities.VerifyThrow(false, $"error: {FormatSideEffect(ref formatted)}"); 56ErrorUtilities.VerifyThrow(false, $"a={1} b={2} c={"three"}");