44 overrides of Message
Aspire.Hosting (1)
Publishing\ProcessFailedException.cs (1)
44public override string Message => ProcessOutput.Count > 0
dotnet-svcutil-lib (5)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaException.cs (1)
185public override string Message
FrameworkFork\Microsoft.Xml\Xml\XmlException.cs (1)
249public override string Message
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathException.cs (1)
83public override string Message
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (1)
1960public override string Message
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultException.cs (1)
136public override string Message
ILCompiler.TypeSystem (1)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\TypeSystemException.cs (1)
32public override string Message
Microsoft.AspNetCore.Identity (1)
SignInManager.cs (1)
1410public override string Message
Microsoft.Build (1)
Errors\InvalidProjectFileException.cs (1)
249public override string Message
Microsoft.Build.Tasks.Core (1)
AssemblyDependency\BadImageReferenceException.cs (1)
38public override string Message => (InnerException == null) ? base.Message : $"{base.Message} {InnerException.Message}";
Microsoft.Extensions.Options (1)
OptionsValidationException.cs (1)
48public override string Message => string.Join("; ", Failures);
Microsoft.TemplateEngine.Cli (1)
Commands\InvalidTemplateParametersException.cs (1)
16public override string Message
MSBuild (2)
CommandLine\CommandLineSwitchException.cs (1)
65public override string Message
InitializationException.cs (1)
71public override string Message
PresentationFramework (1)
MS\Internal\PtsHost\Pts.cs (1)
279public override string Message
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\CompositionException.cs (1)
118public override string Message
System.Configuration.ConfigurationManager (1)
System\Configuration\ConfigurationException.cs (1)
67public override string Message
System.Diagnostics.EventLog (1)
System\Diagnostics\Reader\EventLogException.cs (1)
60public override string Message
System.DirectoryServices (2)
System\DirectoryServices\ActiveDirectory\Exception.cs (2)
71public override string Message 160public override string Message
System.Net.Http (2)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (1)
20public override string Message => _unexpectedValue != null ?
System\Net\Http\HttpIOException.cs (1)
31public override string Message => $"{base.Message} ({HttpRequestError})";
System.Net.NameResolution (1)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (1)
20public override string Message => _unexpectedValue != null ?
System.Net.Primitives (1)
System\Net\SocketException.cs (1)
50public override string Message => base.Message;
System.Net.Requests (1)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (1)
20public override string Message => _unexpectedValue != null ?
System.Net.Security (1)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (1)
20public override string Message => _unexpectedValue != null ?
System.Net.Sockets (1)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (1)
20public override string Message => _unexpectedValue != null ?
System.Private.CoreLib (10)
src\runtime\src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
339public override unsafe string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (1)
73public override string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\BadImageFormatException.cs (1)
73public override string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (1)
45public override string Message => _message ??= FormatFileLoadExceptionMessage(FileName, HResult);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (1)
48public override string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\MissingMemberException.cs (1)
59public override string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
89public override string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionTypeLoadException.cs (1)
49public override string Message => CreateString(isMessage: true);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (1)
53public override string Message
src\runtime\src\libraries\System.Private.CoreLib\src\System\TypeLoadException.cs (1)
41public override string Message
System.Private.Xml (4)
System\Xml\Schema\XmlSchemaException.cs (1)
217public override string Message
System\Xml\XmlException.cs (1)
276public override string Message
System\Xml\XPath\XPathException.cs (1)
122public override string Message
System\Xml\Xslt\XsltException.cs (1)
116public override string Message
System.ServiceModel.Primitives (1)
System\ServiceModel\FaultException.cs (1)
142public override string Message
System.Text.Json (1)
System\Text\Json\JsonException.cs (1)
141public override string Message
System.Xaml (1)
System\Xaml\XamlException.cs (1)
37public override string Message
3564 references to Message
aspire (126)
Acquisition\InstallSidecarReader.cs (1)
75return new InstallSidecarReadResult.Invalid(sidecarPath, error?.Message ?? "Install sidecar file could not be read.");
Agents\AspireSkills\AspireSkillsInstaller.cs (2)
266return AcquisitionResult.Failed(string.Format(CultureInfo.CurrentCulture, AgentCommandStrings.AspireSkillsInstaller_InvalidBundle, ex.Message)); 363return AcquisitionResult.Failed(string.Format(CultureInfo.CurrentCulture, AgentCommandStrings.AspireSkillsInstaller_InvalidBundle, ex.Message));
Agents\DeprecatedMcpCommandScanner.cs (1)
93File.AppendAllText(debugPath, $"[{DateTime.UtcNow:O}] -> IOException: {ex.Message}\n");
Certificates\CertificateGeneration\MacOSCertificateManager.cs (3)
164Log.MacOSAddCertificateToUserProfileDirError(candidate.Thumbprint, ex.Message); 335Log.MacOSAddCertificateToUserProfileDirError(certificate.Thumbprint, ex.Message); 522Log.MacOSRemoveCertificateFromUserProfileDirError(certificate.Thumbprint, ex.Message);
Certificates\CertificateGeneration\UnixCertificateManager.cs (11)
253Log.UnixDotnetTrustException(ex.Message); 458Log.WslWindowsTrustException(ex.Message); 483Log.UnixDotnetUntrustException(ex.Message); 722Log.UnixNssDbCheckException(nssDb.Path, ex.Message); 745Log.UnixNssDbAdditionException(nssDb.Path, ex.Message); 769Log.UnixNssDbRemovalException(nssDb.Path, ex.Message); 798Log.UnixFirefoxProfileEnumerationException(firefoxDirectory, ex.Message); 824Log.UnixCertificateFileDeletionException(certPath, ex.Message); 957Log.UnixOpenSslVersionException(ex.Message); 991Log.UnixOpenSslHashException(certificatePath, ex.Message); 1066Log.UnixOpenSslRehashException(ex.Message);
Certificates\NativeCertificateToolRunner.cs (2)
191return new CertificateCleanResult { Success = false, WasCancelled = true, ErrorMessage = ex.Message }; 195return new CertificateCleanResult { Success = false, ErrorMessage = ex.Message };
Commands\AddCommand.cs (4)
426addActivity.SetError(ex.Message); 427Telemetry.RecordError(ex.Message, ex); 428return CommandResult.Failure(CliExitCodes.FailedToAddPackage, ex.Message); 436var errorMessage = string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileAddingPackage, ex.Message);
Commands\AgentInitCommand.cs (5)
232InteractionService.DisplayError(ex.Message); 433InteractionService.DisplayError(ex.Message); 451InteractionService.DisplayError(ex.Message); 495InteractionService.DisplaySubtleMessage(ex.Message); 749string.Format(CultureInfo.CurrentCulture, AgentCommandStrings.InitCommand_FailedToInstallSkill, skill.Name, fullSkillDirectoryPath, ex.Message));
Commands\AppHostLauncher.cs (2)
517spawnActivity.SetError(ex.Message); 573getDashboardUrlsActivity.SetError(ex.Message);
Commands\BaseCommand.cs (1)
193var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message);
Commands\CacheCommand.cs (1)
67var errorMessage = string.Format(CultureInfo.CurrentCulture, CacheCommandStrings.CacheClearFailed, ex.Message);
Commands\ConfigCommand.cs (2)
191var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message); 429var errorMessage = string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message);
Commands\DashboardRunCommand.cs (1)
427InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, DashboardCommandStrings.DashboardFailedToStart, ex.Message));
Commands\DcpWorkloadCleanupService.cs (1)
67return new DcpWorkloadCleanupResult(CliExitCodes.FailedToDotnetRunAppHost, string.Empty, ex.Message, DcpFound: true);
Commands\ExportCommand.cs (1)
130return CommandResult.Failure(CliExitCodes.DashboardFailure, string.Format(CultureInfo.CurrentCulture, ExportCommandStrings.FailedToExport, ex.Message));
Commands\InitCommand.cs (3)
419InteractionService.DisplayError(ex.Message); 424InteractionService.DisplayError(ex.Message); 433InteractionService.DisplayError(ex.Message);
Commands\IntegrationSearchCommand.cs (1)
143var errorMessage = string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileSearchingIntegrations, ex.Message);
Commands\McpCallCommand.cs (1)
137return CommandResult.Failure(CliExitCodes.InvalidCommand, $"Failed to call tool '{toolName}' on resource '{resourceName}': {ex.Message}");
Commands\NewCommand.cs (1)
482return new ResolveTemplateVersionResult { ErrorMessage = ex.Message };
Commands\PipelineCommandBase.cs (4)
440return CommandResult.Failure(CliExitCodes.AppHostIncompatible, ex.Message); 453var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message); 466var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.AppHostConnectionLost, ex.Message); 479var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message);
Commands\RestoreCommand.cs (1)
182var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message);
Commands\RunCommand.cs (7)
626Telemetry.RecordError(ex.Message, ex); 632var errorMessage = string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message); 644var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message); 660var errorMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message); 819? string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, faultException.Message) 830throw new OperationCanceledException(ex.Message, ex, cancellationToken); 851var failureMessage = string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message);
Commands\Sdk\SdkDumpCommand.cs (1)
369return new IntegrationDumpResult(integration.Name, Success: false, HasErrors: false, ex.Message);
Commands\Sdk\SdkExportCommand.cs (3)
233InteractionService.DisplayError(ex.Message); 238InteractionService.DisplayError(ex.Message); 243InteractionService.DisplayError(ex.Message);
Commands\TelemetryCommandHelpers.cs (2)
354return new TelemetryErrorInfo(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message)); 407return new TelemetryErrorInfo(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.FailedToFetchTelemetry, ex.Message));
Commands\UpdateCommand.cs (4)
412var message = Markup.Escape(ex.Message); 418var message = Markup.Escape(ex.Message); 425if (string.Equals(ex.Message, ErrorStrings.NoProjectFileFound, StringComparisons.CliInputOrOutput)) 742var errorMessage = $"Failed to update CLI: {ex.Message}";
Diagnostics\FileLoggerProvider.cs (1)
87WriteWarning(errorWriter, logFilePath, ex.Message);
Interaction\ExtensionInteractionService.cs (5)
288DisplayError(ex.Message); 326DisplayError(ex.Message); 367DisplayError(ex.Message); 585await Backchannel.DisplayErrorAsync(StringUtils.RemoveMarkup(ex.Message), _cancellationToken); 594_consoleInteractionService.DisplayError(ex.Message);
Layout\LayoutDiscovery.cs (1)
178_logger.LogDebug("Could not list directory contents: {Error}", ex.Message);
Mcp\Tools\DoctorTool.cs (1)
66Content = [new TextContentBlock { Text = $"Failed to check environment: {ex.Message}" }]
Mcp\Tools\ExecuteResourceCommandTool.cs (1)
169throw new McpProtocolException($"Error executing command '{commandName}' for resource '{resourceName}': {ex.Message}", McpErrorCode.InternalError);
Mcp\Tools\ListConsoleLogsTool.cs (1)
150Content = [new TextContentBlock { Text = $"Error retrieving console logs for resource '{resourceName}': {ex.Message}" }]
Mcp\Tools\ListIntegrationsTool.cs (1)
140Content = [new TextContentBlock { Text = $"Failed to list integrations: {ex.Message}" }]
Mcp\Tools\ListStructuredLogsTool.cs (1)
140: $"Failed to fetch structured logs: {ex.Message}";
Mcp\Tools\ListTracesTool.cs (1)
140: $"Failed to fetch traces: {ex.Message}";
Mcp\Tools\ListTraceStructuredLogsTool.cs (1)
130: $"Failed to fetch structured logs for trace: {ex.Message}";
Profiling\ProfileCaptureService.cs (1)
120throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, DashboardCommandStrings.DashboardFailedToStart, ex.Message), ex);
Program.cs (4)
1022Console.Error.WriteLine($"Failed to acquire Aspire bundle lease: {ex.Message}"); 1083errorWriter.WriteLine(ex.Message); 1214errorWriter.WriteLine(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message)); 1254errorWriter.WriteLine(string.Format(CultureInfo.CurrentCulture, ExportCommandStrings.FailedToExport, ex.Message));
Projects\AppHostCodeGenerationException.cs (1)
12/// The <see cref="Exception.Message"/> always contains the short, language-agnostic message the
Projects\AppHostRpcClient.cs (1)
144throw new AppHostCodeGenerationException(ex.Message, diagnostic, ex);
Projects\AppHostServerSession.cs (1)
216_activity.SetError(ex.Message);
Projects\DotNetAppHostProject.cs (1)
1471isolatedModeActivity.SetError(ex.Message);
Projects\FallbackProjectParser.cs (1)
65throw new ProjectUpdaterException($"Failed to parse project file '{projectFile.FullName}' using fallback parser: {ex.Message}", ex);
Projects\GuestAppHostProject.cs (2)
780_interactionService.DisplayError($"Failed to run {DisplayName} AppHost: {ex.Message}"); 1252_interactionService.DisplayError($"Failed to publish {DisplayName} AppHost: {ex.Message}");
Projects\PrebuiltAppHostServer.cs (1)
251output.AppendError($"Failed to prepare: {ex.Message}");
Projects\ProjectLocator.cs (1)
1429_ => (CliExitCodes.FailedToFindProject, string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message))
Projects\ProjectUpdater.cs (2)
345logger.LogWarning("Falling back to parsing for '{ProjectFile}'. Reason: {Message}", projectFile.FullName, ex.Message); 863ex.Message),
src\Shared\ContainerRuntimeDetector.cs (1)
235logger?.LogDebug("{Name}: not found on PATH ({ExceptionMessage})", name, ex.Message);
Telemetry\AspireCliTelemetry.cs (1)
204[TelemetryConstants.Tags.ExceptionMessage] = exception.Message,
Telemetry\ProfilingTelemetry.cs (1)
1165public void SetError(Exception exception) => activity?.SetStatus(ActivityStatusCode.Error, exception.Message);
Templating\CliTemplateFactory.EmptyTemplate.cs (1)
121_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\CliTemplateFactory.GoStarterTemplate.cs (1)
103_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\CliTemplateFactory.JavaStarterTemplate.cs (1)
103_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\CliTemplateFactory.PythonStarterTemplate.cs (1)
117_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (1)
101_interactionService.DisplayError($"Failed to create project files: {ex.Message}");
Templating\DotNetTemplateFactory.cs (4)
573interactionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message)); 578interactionService.DisplayError(ex.Message); 583interactionService.DisplayError(ex.Message); 592interactionService.DisplayError(ex.Message);
Utils\CliUpdateNotifier.cs (1)
86return GetCachedVersionStatus(ex.Message);
Utils\EnvironmentChecker\AspireVersionCheck.cs (6)
59Details = ex.Message 151Details = ex.Message, 152Metadata = BuildCliVersionMetadata(currentVersion: null, latestVersion: null, updateCommand: null, updateCheckError: ex.Message, identityChannel, latestVersionChannel: null) 244Details = ex.Message 257Details = ex.Message 330Details = ex.Message,
Utils\EnvironmentChecker\ContainerRuntimeCheck.cs (1)
94Details = ex.Message
Utils\EnvironmentChecker\DcpConnectionChecker.cs (4)
100details: ex.Message, 107details: string.Format(CultureInfo.CurrentCulture, DoctorCommandStrings.DcpTlsAuthenticationFailedDetailsFormat, ex.Message), 112return Failed(useDeveloperCertificate, details: ex.Message); 116return Failed(useDeveloperCertificate, details: ex.Message);
Utils\EnvironmentChecker\DcpConnectionHealthCheck.cs (1)
96Details = ex.Message
Utils\EnvironmentChecker\DevCertsCheck.cs (1)
59Details = ex.Message
Utils\EnvironmentChecker\DotNetSdkCheck.cs (1)
81Details = ex.Message
Utils\EnvironmentChecker\TypeScriptAppHostToolingCheck.cs (1)
73Details = ex.Message,
Utils\ProcessCaptureRunner.cs (2)
57FailureMessage: ex.Message, 89FailureMessage: ex.Message,
aspire-managed (6)
NuGet\Commands\LayoutCommand.cs (1)
127Console.Error.WriteLine($"Error: {ex.Message}");
NuGet\Commands\ManifestCommand.cs (1)
118Console.Error.WriteLine($"Error: {ex.Message}");
NuGet\Commands\RestoreCommand.cs (1)
225Console.Error.WriteLine($"Error: {ex.Message}");
NuGet\Commands\SearchCommand.cs (2)
145Console.Error.WriteLine($"Warning: Failed to search {source.Name}: {ex.Message}"); 169Console.Error.WriteLine($"Error: {ex.Message}");
Program.cs (1)
17Console.Error.WriteLine($"Failed to acquire Aspire bundle lease: {ex.Message}");
Aspire.Acquisition.Tests (2)
Scripts\Common\RealGitHubPRFixture.cs (2)
104_testOutput.WriteLine($"Skipping PR {prNumber}: {ex.GetType().Name}: {ex.Message}"); 141_testOutput.WriteLine($"Skipping artifact query for run {successfulRun.DatabaseId}: {ex.GetType().Name}: {ex.Message}");
Aspire.Azure.AI.OpenAI.Tests (4)
AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs (2)
129Assert.StartsWith("The connection string 'openai' contains both 'Deployment' and 'Model' keys.", ex.Message); 160Assert.StartsWith("The deployment could not be determined", ex.Message);
AspireAzureOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (2)
129Assert.StartsWith("The connection string 'openai' contains both 'Deployment' and 'Model' keys.", ex.Message); 160Assert.StartsWith("The deployment could not be determined", ex.Message);
Aspire.Azure.Messaging.WebPubSub.Tests (1)
AspireWebPubSubExtensionsTests.cs (1)
156Assert.Equal("A WebPubSubServiceClient could not be configured. Ensure a valid HubName was configured or provided in the 'Aspire:Azure:Messaging:WebPubSub' configuration section.", ex.Message);
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (4)
AspireAzureEFPostgreSqlExtensionsTests.cs (1)
283Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddNpgsqlDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichNpgsqlTests.cs (3)
38Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichNpgsqlDbContext.", exception.Message); 113Assert.Equal("Conflicting values for 'CommandTimeout' were found in NpgsqlEntityFrameworkCorePostgreSQLSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 319Assert.Equal("NpgsqlEntityFrameworkCorePostgreSQLSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.Cli.EndToEnd.Tests (17)
Helpers\CliE2ETestHelpers.cs (2)
685log($"Failed to query nuget.org for the latest stable Aspire version: {ex.Message}"); 772log($"Failed to discover the latest staging build: {ex.Message}");
Helpers\CliInstallStrategyTests.cs (9)
238Assert.Contains("prebuilt CLI E2E image", exception.Message); 287Assert.Contains(CliE2ETestHelpers.PolyglotImageEnvironmentVariableName, exception.Message); 318Assert.Contains(CliE2ETestHelpers.PolyglotJavaImageEnvironmentVariableName, exception.Message); 363Assert.Contains(CliE2ETestHelpers.DotNetImageEnvironmentVariableName, exception.Message); 603Assert.Contains("ASPIRE_E2E_QUALITY", exception.Message); 818Assert.Contains("Found 2 Aspire.Cli pointer nupkg files", exception.Message); 837Assert.Contains("No Aspire.Cli tool nupkg found", exception.Message); 941Assert.Contains("GITHUB_PR_HEAD_SHA must be set", exception.Message); 954Assert.Contains("40-character commit SHA", exception.Message);
Helpers\KubernetesDeployTestHelpers.cs (1)
480output.WriteLine($"Cleanup: Failed to delete KinD cluster '{clusterName}': {ex.Message}");
KubernetesPublishTests.cs (1)
310output.WriteLine($"Cleanup: Failed to delete KinD cluster '{clusterName}': {ex.Message}");
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Cli.Tests (136)
Acquisition\IdentityResolverTests.cs (6)
162Assert.Contains(IdentityResolver.VersionEnvVar, ex.Message); 163Assert.Contains(version, ex.Message); 174Assert.Contains(InstallSidecarReader.SidecarFileName, ex.Message); 175Assert.Contains("version", ex.Message); 205Assert.Contains(IdentityResolver.CommitEnvVar, ex.Message); 233Assert.Contains(IdentityResolver.NuGetServiceIndexEnvVar, ex.Message);
Acquisition\InstallationDiscoveryDiscoverAllTests.cs (1)
313Assert.Contains(nameof(UnknownPeerProbeResult), exception.Message);
Acquisition\InstallSidecarWriterTests.cs (1)
88Assert.Contains("exceeds", exception.Message);
Agents\AspireSkillsBundleTests.cs (18)
131Assert.Contains("failed SHA-512 verification", exception.Message); 217Assert.Contains("SHA-512 or SHA-256", exception.Message, StringComparison.Ordinal); 237Assert.Equal("Aspire skills bundle manifest is invalid.", exception.Message); 263Assert.Equal("Aspire skills bundle manifest contains an empty skill entry.", exception.Message); 296Assert.Equal("Aspire skills bundle skill 'aspire' contains an empty file entry.", exception.Message); 318Assert.Contains("description", exception.Message, StringComparison.OrdinalIgnoreCase); 319Assert.Contains("1024", exception.Message, StringComparison.Ordinal); 351Assert.Contains("duplicate skill", exception.Message, StringComparison.OrdinalIgnoreCase); 380Assert.Contains("must define a frontmatter name", exception.Message, StringComparison.Ordinal); 403Assert.Contains("must match its manifest and directory name", exception.Message, StringComparison.Ordinal); 451Assert.Contains("must be 1-64 characters", exception.Message, StringComparison.Ordinal); 474Assert.Contains("must contain SKILL.md", exception.Message); 497Assert.Contains("cannot exclude SKILL.md", exception.Message); 540Assert.Contains("is not safe", exception.Message); 594Assert.Contains("is not safe", exception.Message); 624Assert.Contains("is not safe", exception.Message); 714Assert.Contains("supported Aspire versions", exception.Message); 737Assert.Contains("supports Aspire CLI versions", exception.Message);
Agents\AspireSkillsInstallerTests.cs (2)
1490Assert.Contains("supports Aspire CLI versions", exception.Message); 1520Assert.Contains("was not found", exception.Message);
Agents\ClaudeCodeAgentEnvironmentScannerTests.cs (3)
42Assert.Contains(mcpJsonPath, ex.Message); 43Assert.Contains("malformed JSON", ex.Message); 68Assert.Contains(mcpJsonPath, ex.Message);
Agents\CopilotCliAgentEnvironmentScannerTests.cs (3)
225Assert.Contains(mcpConfigPath, ex.Message); 226Assert.Contains("malformed JSON", ex.Message); 251Assert.Contains(mcpConfigPath, ex.Message);
Agents\OpenCodeAgentEnvironmentScannerTests.cs (3)
39Assert.Contains(configPath, ex.Message); 40Assert.Contains("malformed JSON", ex.Message); 63Assert.Contains(configPath, ex.Message);
Agents\VsCodeAgentEnvironmentScannerTests.cs (3)
298Assert.Contains(mcpJsonPath, ex.Message); 299Assert.Contains("malformed JSON", ex.Message); 324Assert.Contains(mcpJsonPath, ex.Message);
Backchannel\AppHostCliBackchannelTests.cs (5)
40Assert.Contains("large.bin", ex.Message); 41Assert.Contains("2048", ex.Message); 42Assert.Contains("1024", ex.Message); 43Assert.Contains(KnownConfigNames.MaxFileUploadSize, ex.Message); 80Assert.DoesNotContain("exceeds the maximum upload size", ex.Message);
Commands\AppHostLauncherTests.cs (1)
143Assert.Equal("connection lost", exception.Message);
Commands\BaseCommandTests.cs (1)
165Assert.Contains(nameof(BaseCommand.PrefetchesTemplatePackageMetadata), exception.Message);
Commands\InitCommandTests.cs (1)
714Assert.Contains(AspireConfigFile.FileName, ex.Message, StringComparison.Ordinal);
Commands\McpIconHelperTests.cs (2)
71Assert.Contains("Could not find embedded resource", exception.Message); 72Assert.Contains(invalidResourceNamespace, exception.Message);
DotNet\DotNetCliRunnerTests.cs (3)
1082Assert.Contains("Timed out waiting for AppHost backchannel", exception.Message); 1124Assert.Equal("The AppHost process exited", exception.Message); 1166Assert.Equal("The AppHost process exited unexpectedly with exit code 42", exception.Message);
Git\GitWorktreeTests.cs (6)
97Assert.Skip($"Cannot create a directory symlink or junction in this environment: {ex.Message}"); 101Assert.Skip($"Directory symlink or junction creation failed in this environment: {ex.Message}"); 154Assert.Skip($"Cannot create a directory symlink or junction in this environment: {ex.Message}"); 158Assert.Skip($"Directory symlink or junction creation failed in this environment: {ex.Message}"); 255Assert.Skip($"Cannot create a directory symlink or junction in this environment: {ex.Message}"); 259Assert.Skip($"Directory symlink or junction creation failed in this environment: {ex.Message}");
Interaction\ConsoleInteractionServiceTests.cs (4)
391Assert.Contains(InteractionServiceStrings.InteractiveInputNotSupported, exception.Message); 404Assert.Contains(InteractionServiceStrings.InteractiveInputNotSupported, exception.Message); 417Assert.Contains(InteractionServiceStrings.InteractiveInputNotSupported, exception.Message); 429Assert.Contains(InteractionServiceStrings.InteractiveInputNotSupported, exception.Message);
Interaction\ExtensionInteractionServiceTests.cs (1)
206Assert.Equal("Invalid path.", exception.Message);
Mcp\ExecuteResourceCommandToolTests.cs (7)
48Assert.Contains("No Aspire AppHost", exception.Message); 49Assert.Contains("aspire start", exception.Message); 133Assert.Contains("must be a JSON object", exception.Message); 152Assert.Contains("must be a string, number, boolean, or null", exception.Message); 251Assert.Contains("cancelled", exception.Message); 291Assert.Contains("Missing required arguments", exception1.Message); 298Assert.Contains("Missing required arguments", exception2.Message);
Mcp\ListConsoleLogsToolTests.cs (3)
30Assert.Contains("No Aspire AppHost", exception.Message); 31Assert.Contains("aspire start", exception.Message); 46Assert.Contains("resourceName", exception.Message);
Mcp\ListResourcesToolTests.cs (2)
24Assert.Contains("No Aspire AppHost", exception.Message); 25Assert.Contains("aspire start", exception.Message);
Mcp\ListStructuredLogsToolTests.cs (2)
32Assert.Contains("No Aspire AppHost", exception.Message); 50Assert.Contains(McpErrorMessages.DashboardNotAvailable, exception.Message);
NuGet\NuGetPackagePrefetcherTests.cs (2)
63Assert.Contains(nameof(BaseCommand.PrefetchesTemplatePackageMetadata), exception.Message); 81Assert.Contains(nameof(BaseCommand.PrefetchesCliPackageMetadata), exception.Message);
Packaging\PackagingServiceTests.cs (9)
2239Assert.Contains("Aspire.Hosting", ex.Message); 2240Assert.Contains("13.4.1", ex.Message); 2241Assert.Contains("13.4.2", ex.Message); 2242Assert.DoesNotContain("Aspire.ProjectTemplates", ex.Message); 2269Assert.Contains("Aspire.Hosting", ex.Message); 2270Assert.Contains("13.4.1", ex.Message); 2271Assert.Contains("13.4.2", ex.Message); 2272Assert.DoesNotContain("Aspire.ProjectTemplates", ex.Message); 2289Assert.Contains(missingDir.FullName, ex.Message);
Processes\IsolatedProcessTests.cs (1)
109Assert.Equal("intentional callback failure", fault.Message);
ProfileCaptureServiceTests.cs (6)
128Assert.Equal(DashboardCommandStrings.ManagedBinaryNotFound, exception.Message); 150Assert.Contains("boom", exception.Message, StringComparison.Ordinal); 181Assert.Contains(managedPath, exception.Message, StringComparison.Ordinal); 208Assert.Equal(DashboardCommandStrings.DashboardStartTimedOut, exception.Message); 251Assert.Contains("42", exception.Message, StringComparison.Ordinal); 271Assert.Equal(DashboardCommandStrings.DashboardStartTimedOut, exception.Message);
Projects\AppHostServerSessionTests.cs (2)
152Assert.Equal("AppHost server process exited before the RPC connection could be established. Exit code: 0.", exception.Message); 401if (e.Exception.InnerExceptions.Any(static ex => ex is InvalidOperationException { Message: "simulated launch failure" }))
Projects\AppHostWorkloadIdTests.cs (2)
102Assert.Skip($"Cannot create symbolic links in this environment: {ex.Message}"); 106Assert.Skip($"Symbolic link creation failed in this environment: {ex.Message}");
Projects\FallbackProjectParserTests.cs (1)
363Assert.Contains("Unsupported project file type", exception.Message);
Projects\GuestAppHostProjectTests.cs (2)
1097Assert.Equal(expectedMessage, exception.Message); 1132Assert.Contains("after 0 seconds", exception.Message);
Projects\JavaAppHostToolchainResolverTests.cs (3)
293Assert.Contains(wrapperName, ex.Message); 294Assert.Contains(generateCommand, ex.Message); 381Assert.Contains(innerCheckout.FullName, ex.Message);
Projects\PrebuiltAppHostServerTests.cs (3)
1164Assert.Equal(unavailableReason, ex.Message); 1179Assert.Equal(unavailableReason, ex.Message); 1198Assert.Equal(unavailableReason, ex.Message);
Projects\ProjectLocatorTests.cs (13)
496Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 647Assert.Equal(ErrorStrings.AppHostsMayNotBeBuildable, ex.Message); 678Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 710Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 1375Assert.Equal(ErrorStrings.NoProjectFileFound, ex.Message); 1984Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2055Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2300Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2364Assert.Equal(ErrorStrings.AppHostsMayNotBeBuildable, ex.Message); 2411Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 2539Assert.Equal(ErrorStrings.ProjectFileDoesntExist, ex.Message); 4046Assert.Skip($"Cannot create symbolic links in this environment: {ex.Message}"); 4050Assert.Skip($"Symbolic link creation failed in this environment: {ex.Message}");
Projects\ProjectUpdaterTests.cs (3)
2116Assert.Contains("Unable to resolve MSBuild property 'InvalidVersionProperty' to a valid semantic version", exception.Message); 2226Assert.Contains("Unable to resolve MSBuild property 'NonExistentProperty' to a valid semantic version", exception.Message); 2227Assert.Contains("Resolved value: 'null'", exception.Message);
Projects\TypeScriptAppHostToolchainResolverTests.cs (3)
46Assert.Equal($"Yarn Classic is not supported for TypeScript AppHosts. Upgrade 'yarn@1.22.22' in {packageJsonPath} to Yarn 4 or later, or use npm, pnpm, or Bun.", exception.Message); 70Assert.Equal($"Yarn Classic is not supported for TypeScript AppHosts. Upgrade the Yarn lockfile at {yarnLockPath} to Yarn 4 or later, or use npm, pnpm, or Bun.", exception.Message); 86Assert.Equal($"Yarn Classic is not supported for TypeScript AppHosts. Upgrade the Yarn lockfile at {yarnLockPath} to Yarn 4 or later, or use npm, pnpm, or Bun.", exception.Message);
Templating\TemplateNuGetConfigServiceTests.cs (2)
713exception.Message); 869exception.Message);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Utils\PathNormalizerTests.cs (2)
114Assert.Skip($"Cannot create symbolic links in this environment: {ex.Message}"); 118Assert.Skip($"Symbolic link creation failed in this environment: {ex.Message}");
Aspire.Dashboard (16)
Components\Dialogs\ManageDataDialog.razor.cs (3)
588_errorMessage = $"{Loc[nameof(Resources.Dialogs.ManageDataRemoveErrorMessage)]}: {ex.Message}"; 624_errorMessage = $"{Loc[nameof(Resources.Dialogs.ManageDataImportErrorMessage)]}: {ex.Message}"; 655_errorMessage = $"{Loc[nameof(Resources.Dialogs.ManageDataExportErrorMessage)]}: {ex.Message}";
Configuration\DashboardOptions.cs (2)
434errorMessage = $"Error converting server certificate payload from base64 to bytes: {ex.Message}"; 444errorMessage = $"Error reading server certificate as X509Certificate2: {ex.Message}";
DashboardWebApplication.cs (4)
1007Console.Error.WriteLine($"Error: {ex.Message}"); 1016Console.Error.WriteLine($"Error: {ex.Message}"); 1048Console.Error.WriteLine($"Error: {ex.Message}"); 1057Console.Error.WriteLine($"Error: {ex.Message}");
Model\DashboardCommandExecutor.cs (1)
66telemetryService.EndOperation(operationId, TelemetryResult.Failure, ex.Message);
Model\GenAI\GenAIItemPartViewModel.cs (1)
58ErrorMessage = part is UnexpectedErrorPart errorPart ? errorPart.Error?.Message : null,
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
147sb.AppendLine(CultureInfo.InvariantCulture, $"{current.GetType().FullName}: {current.Message}"); 576Error description: {ex.GetType().FullName}: {ex.Message}
ServiceClient\TracingSqliteConnection.cs (1)
137activity?.SetStatus(ActivityStatusCode.Error, exception.Message);
Telemetry\TelemetryErrorRecorder.cs (2)
36$"{exception.GetType().FullName}: {exception.Message}", 41[TelemetryPropertyKeys.ExceptionMessage] = new AspireTelemetryProperty(exception.Message),
Aspire.Dashboard.Components.Tests (5)
Dialogs\InteractionsInputDialogTests.cs (1)
120Assert.Contains(InteractionHelpers.MaxFileCount.ToString(), exception.Message, StringComparison.Ordinal);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Dashboard.Tests (22)
Integration\Playwright\BrowserTokenAuthenticationTests.cs (2)
203return ex.Message.Contains("Executable doesn't exist", StringComparison.Ordinal) || 204ex.Message.Contains("Host system is missing dependencies", StringComparison.Ordinal);
Integration\StartupTests.cs (1)
329Assert.Contains(fileConfigDirectory, ex.Message);
Model\DashboardDataSourceTests.cs (5)
102Assert.Equal($"Dashboard run '{firstRunStore.RunId}' is already in use by another dashboard process.", exception.Message); 408exception.Message); 945Assert.Contains("does not match run metadata schema version", exception.Message, StringComparison.Ordinal); 1124Assert.Equal("Historical dashboard data is read-only.", exception.Message); 1147Assert.Equal("Historical dashboard data is read-only.", clearException.Message);
Model\DashboardSqliteDatabaseTests.cs (2)
50exception.Message); 135Assert.Equal(exception.Message, activity.StatusDescription);
Model\GenAIMessageParsingHelperTests.cs (1)
328Assert.Contains("Missing 'type' property", errorPart.Error.Message);
Model\ResourceViewModelTests.cs (1)
106Assert.Equal(@"Error converting resource ""TestName-abc"" to ResourceViewModel.", ex.Message);
OtlpApiKeyAuthenticationHandlerTests.cs (2)
29Assert.Equal($"API key from '{OtlpApiKeyAuthenticationHandler.ApiKeyHeaderName}' header is missing.", result.Failure.Message); 43Assert.Equal($"Incoming API key from '{OtlpApiKeyAuthenticationHandler.ApiKeyHeaderName}' header doesn't match configured API key.", result.Failure.Message);
TelemetryRepositoryTests\TelemetryLimitTests.cs (1)
249write.Exception!.Message);
TelemetryRepositoryTests\TraceTests.cs (1)
562Assert.Equal("Circular loop detected for span '312d31' with parent '312d31'.", write.Exception!.Message);
Terminal\TerminalWebSocketProxyEndpointTests.cs (2)
48Assert.Contains("403", ex.Message); 68Assert.Contains("403", ex.Message);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Deployment.EndToEnd.Tests (173)
AcaCompactNamingDeploymentTests.cs (5)
185output.WriteLine($"❌ Test failed: {ex.Message}"); 190ex.Message, 329output.WriteLine($"❌ Test failed: {ex.Message}"); 334ex.Message, 370output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AcaCompactNamingUpgradeDeploymentTests.cs (3)
379output.WriteLine($"❌ Test failed: {ex.Message}"); 384ex.Message, 420output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AcaCustomRegistryDeploymentTests.cs (3)
206output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 211ex.Message, 250output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AcaDeploymentErrorOutputTests.cs (3)
161output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 166ex.Message, 202output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AcaExistingRegistryDeploymentTests.cs (3)
238output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 243ex.Message, 286output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AcaManagedRedisDeploymentTests.cs (3)
242output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 247ex.Message, 287output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AcaStarterDeploymentTests.cs (3)
192output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 197ex.Message, 239output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AcrPurgeTaskDeploymentTests.cs (3)
243output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 248ex.Message, 283output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AksAzureKubernetesEnvironmentCertManagerDeploymentTests.cs (4)
343output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 348ex.Message, 383output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 384DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksAzureKubernetesEnvironmentCertManagerTypeScriptDeploymentTests.cs (4)
359output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 364ex.Message, 399output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 400DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksAzureKubernetesEnvironmentGatewayDeploymentTests.cs (4)
302output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 307ex.Message, 343output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 344DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksBlazorRedisDeploymentTests.cs (4)
228output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 233ex.Message, 273output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 274DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksMultipleNodePoolsDeploymentTests.cs (4)
238output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 243ex.Message, 283output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 284DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksPersistentVolumeDeploymentTests.cs (4)
195output.WriteLine($"Test failed after {duration}: {ex.Message}"); 199ex.Message, 490output.WriteLine($"Failed to cleanup resource group: {ex.Message}"); 491DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksStarterDeploymentTests.cs (4)
350output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 355ex.Message, 401output.WriteLine($"Failed to cleanup resource group: {ex.Message}"); 402DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksStarterWithRedisHelmDeploymentTests.cs (4)
380output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 385ex.Message, 430output.WriteLine($"Failed to cleanup resource group: {ex.Message}"); 431DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksVnetInfraDeploymentTests.cs (3)
186output.WriteLine($"Test failed: {ex.Message}"); 191ex.Message); 233output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AksVnetWithAzureResourcesDeploymentTests.cs (4)
331output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 336ex.Message, 376output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 377DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksWithAzureResourcesDeploymentTests.cs (4)
312output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 317ex.Message, 357output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 358DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AksWithHelmChartDeploymentTests.cs (4)
252output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 257ex.Message, 292output.WriteLine($"Failed to trigger cleanup: {ex.Message}"); 293DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
AppServicePythonDeploymentTests.cs (3)
194output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 199ex.Message, 235output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
AppServiceReactDeploymentTests.cs (2)
237output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 242ex.Message,
AppServiceStoragePrivateEndpointDeploymentTests.cs (1)
243ex.Message,
AzureAppConfigDeploymentTests.cs (3)
162output.WriteLine($"Test failed: {ex.Message}"); 167ex.Message); 209output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureContainerRegistryDeploymentTests.cs (3)
145output.WriteLine($"Test failed: {ex.Message}"); 150ex.Message); 192output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureEventHubsDeploymentTests.cs (3)
162output.WriteLine($"Test failed: {ex.Message}"); 167ex.Message); 209output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureKeyVaultDeploymentTests.cs (3)
162output.WriteLine($"Test failed: {ex.Message}"); 167ex.Message); 209output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureLogAnalyticsDeploymentTests.cs (3)
145output.WriteLine($"Test failed: {ex.Message}"); 150ex.Message); 192output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureResourceScopeDeploymentTests.cs (3)
156output.WriteLine($"Test failed: {ex.Message}"); 161ex.Message); 243output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureRoleAssignmentRunModeTests.cs (4)
207output.WriteLine($"Test failed: {ex.Message}"); 212ex.Message); 232output.WriteLine($"Failed to exit terminal cleanly: {ex.Message}"); 274output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureServiceBusDeploymentTests.cs (3)
164output.WriteLine($"Test failed: {ex.Message}"); 169ex.Message); 211output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureStorageDeploymentTests.cs (5)
179output.WriteLine($"Test failed: {ex.Message}"); 184ex.Message); 339output.WriteLine($"Test failed: {ex.Message}"); 344ex.Message); 386output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
AzureStorageRunModeTests.cs (4)
187output.WriteLine($"Test failed: {ex.Message}"); 192ex.Message); 212output.WriteLine($"Failed to exit terminal cleanly: {ex.Message}"); 258output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
FoundryHostedAgentDeploymentTests.cs (3)
312output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 317ex.Message, 357output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
FrontDoorDeploymentTests.cs (3)
214output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 219ex.Message, 254output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
Helpers\DeploymentE2ETestHelpers.cs (1)
178log($"Failed to stop AppHost: {ex.Message}");
KubernetesGatewayTlsDeploymentTests.cs (4)
453output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 458ex.Message, 503output.WriteLine($"Failed to cleanup resource group: {ex.Message}"); 504DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
KubernetesHelmChartDeploymentTests.cs (4)
296output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 301ex.Message, 346output.WriteLine($"Failed to cleanup resource group: {ex.Message}"); 347DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
NspStorageKeyVaultDeploymentTests.cs (3)
326output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 331ex.Message, 366output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
PythonFastApiDeploymentTests.cs (3)
196output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 201ex.Message, 237output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
RadiusStarterDeploymentTests.cs (5)
612output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 617ex.Message, 674output.WriteLine($"Failed to terminate timed-out cleanup process: {killEx.Message}"); 699output.WriteLine($"Failed to cleanup resource group: {ex.Message}"); 700DeploymentReporter.ReportCleanupStatus(resourceGroupName, success: false, ex.Message);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
TypeScriptAzureContainerAppJobDeploymentTests.cs (3)
94output.WriteLine($"Test failed after {duration}: {ex.Message}"); 99ex.Message, 180output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
TypeScriptExpressDeploymentTests.cs (3)
184output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 189ex.Message, 224output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
TypeScriptJavaScriptHostingDeploymentTests.cs (3)
96output.WriteLine($"Test failed after {duration}: {ex.Message}"); 101ex.Message, 225output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
TypeScriptVnetSqlServerInfraDeploymentTests.cs (3)
252output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 257ex.Message, 292output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
VnetKeyVaultConnectivityDeploymentTests.cs (3)
238output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 243ex.Message, 278output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
VnetKeyVaultInfraDeploymentTests.cs (3)
173output.WriteLine($"Test failed: {ex.Message}"); 178ex.Message); 220output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
VnetSqlServerConnectivityDeploymentTests.cs (3)
305output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 310ex.Message, 345output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
VnetSqlServerInfraDeploymentTests.cs (3)
174output.WriteLine($"Test failed: {ex.Message}"); 179ex.Message); 221output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
VnetStorageBlobConnectivityDeploymentTests.cs (3)
245output.WriteLine($"❌ Test failed after {duration}: {ex.Message}"); 250ex.Message, 285output.WriteLine($"Failed to trigger cleanup: {ex.Message}");
VnetStorageBlobInfraDeploymentTests.cs (3)
175output.WriteLine($"Test failed: {ex.Message}"); 180ex.Message); 222output.WriteLine($"Failed to cleanup resource group: {ex.Message}");
Aspire.EndToEnd.Tests (5)
tests\Shared\TemplatesTesting\AspireProject.cs (3)
378return ex.Message.Contains("net::ERR_NETWORK_CHANGED", StringComparison.OrdinalIgnoreCase) || 379ex.Message.Contains("net::ERR_SOCKET_NOT_CONNECTED", StringComparison.OrdinalIgnoreCase); 383_testOutput.WriteLine($"Reloading dashboard page due to {args.Outcome.Exception?.Message}");
tests\Shared\TemplatesTesting\BuildEnvironment.cs (1)
272Console.WriteLine($"\tFailed to delete {dir} : {ioex.Message}. Ignoring.");
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
26catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
Aspire.Hosting (32)
ApplicationModel\ResourceCommandAnnotation.cs (2)
285/// Produces an unsuccessful result from an <see cref="Exception"/>. <see cref="Exception.Message"/> is used as the error message. 288public static ExecuteCommandResult Failure(Exception exception) => Failure(exception.Message);
ApplicationModel\ResourceCommandService.cs (1)
405return new ExecuteCommandResult { Success = false, Message = ex.Message };
Backchannel\AuxiliaryBackchannelRpcTarget.cs (1)
665return new WaitForResourceResponse { Success = false, ErrorMessage = ex.Message };
Backchannel\AuxiliaryBackchannelService.cs (1)
119logger.LogDebug("Auxiliary backchannel service was cancelled: {Message}", ex.Message);
Backchannel\BackchannelService.cs (1)
102logger.LogDebug("Backchannel service was cancelled: {Message}", ex.Message);
Dashboard\DashboardService.cs (1)
540throw new RpcException(new Status(StatusCode.FailedPrecondition, ex.Message));
Dcp\DcpDependencyCheck.cs (1)
119$"{ex.Message} {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}"
Dcp\DcpExecutor.cs (2)
1055await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, er.ModelResource, er.DcpResource.Metadata.Name, ex.Message)).ConfigureAwait(false); 1268await _executorEvents.PublishAsync(new OnResourceFailedToStartContext(cancellationToken, resourceType, resourceReference.ModelResource, resourceReference.DcpResourceName, ex.Message)).ConfigureAwait(false);
Dcp\DcpPipelineBuilder.cs (1)
25logger.LogDebug("Retrying check for deleted resource. Attempt: {Attempt}. Error message: {ErrorMessage}", retry.AttemptNumber, retry.Outcome.Exception?.Message);
Dcp\ExecutableCreator.cs (2)
86resourceLogger.LogError(ex, "{Message}", ex.Message); 103ex.Message;
Devcontainers\DevcontainerSettingsWriter.cs (1)
260catch (IOException ex) when (ex.Message == $"The file '{path}' already exists.")
DeveloperCertificateService.cs (1)
85logger.LogWarning("Failed to load developer certificates from the CurrentUser/My certificate store. Automatic trust of development certificates will not be available. Reason: {Message}", ex.Message);
Diagnostics\ProfilingTelemetry.cs (3)
821[Tags.ExceptionMessage] = exception?.Message 1009activity.SetStatus(ActivityStatusCode.Error, exception.Message); 1013[Tags.ExceptionMessage] = exception.Message
Orchestrator\ApplicationOrchestrator.cs (1)
571resourceLogger.LogError(ex, "An error occurred while processing URLs for resource '{ResourceName}': {Message}", resource.Name, ex.Message);
Orchestrator\ParameterProcessor.cs (1)
200await UpdateParameterStateAsync(parameterResource, ex.Message, new(stateText, stateStyle)).ConfigureAwait(false);
Pipelines\DistributedApplicationPipeline.cs (3)
920await reportingStep.FailAsync(ex.Message).ConfigureAwait(false); 1030await reportingStep.FailAsync(ex.Message).ConfigureAwait(false); 1149$"Step '{step.Name}' failed: {ex.Message}", exceptionInfo.SourceException);
Pipelines\PipelineStepHelpers.cs (2)
98new MarkdownString($"Failed to tag **{resource.Name}**: {ex.Message}"), 138new MarkdownString($"Failed to push **{resource.Name}**: {ex.Message}"),
Publishing\PipelineExecutor.cs (3)
89logger.LogError(ex, ex.Message); 93await activityReporter.CompletePublishAsync(new PublishCompletionOptions { CompletionMessage = ex.Message, CompletionState = CompletionState.CompletedWithError }, stoppingToken).ConfigureAwait(false); 97throw new DistributedApplicationException($"Pipeline execution failed: {ex.Message}", ex);
Publishing\ProcessFailedException.cs (2)
45? $"{base.Message}{Environment.NewLine}{GetFormattedOutput()}" 46: base.Message;
src\Shared\ContainerRuntimeDetector.cs (1)
235logger?.LogDebug("{Name}: not found on PATH ({ExceptionMessage})", name, ex.Message);
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Azure (16)
AzureBicepResource.cs (1)
380_ => $"Deployment failed: {ex.Message}"
AzureEnvironmentResource.cs (1)
380$"Failed to delete resource group '{resourceGroupName}': {ex.Message}",
AzureProvisioningController.cs (6)
2602json["message"] = ex.Message; 2715return CommandResults.Failure(exception.Message); 2725["message"] = exception.Message, 2727["summary"] = exception.Message, 2734return CommandResults.Failure(exception.Message, CreateJsonResultData(json, displayImmediately: true)); 2867=> ex.Message.Contains("Concurrency conflict detected in section", StringComparison.Ordinal);
AzureProvisioningFailureDetails.cs (2)
75var errorMessage = StringUtils.FirstNonEmpty(parsedError?.ErrorMessage, requestEx.Message) ?? requestEx.Message;
AzurePublishingContext.cs (1)
108await writeTask.FailAsync($"Failed to write Azure Bicep templates: {ex.Message}", cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (4)
147await step.FailAsync($"Failed to retrieve tenant information: {ex.Message}", cancellationToken).ConfigureAwait(false); 246await step.FailAsync($"Failed to retrieve subscription information: {ex.Message}", cancellationToken).ConfigureAwait(false); 345await step.FailAsync($"Failed to retrieve resource group information: {ex.Message}", cancellationToken).ConfigureAwait(false); 440await step.FailAsync($"Failed to retrieve region information: {ex.Message}", cancellationToken).ConfigureAwait(false);
Provisioning\Provisioners\BicepProvisioner.cs (1)
1310resourceLogger.LogWarning("Failed to cancel Azure deployment {DeploymentName}: {Message}", deploymentName, ex.Message);
Aspire.Hosting.Azure.ContainerRegistry (2)
AzureContainerRegistryExtensions.cs (1)
173$"The schedule '{schedule}' is not a valid five-part cron expression (minute hour day-of-month month day-of-week). {ex.Message}",
AzureContainerRegistryHelpers.cs (1)
61new MarkdownString($"Login to ACR **{registryEndpoint}** failed: {ex.Message}"),
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Azure.Kubernetes (2)
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
315$"Failed to fetch AKS credentials: {ex.Message}", 487$"Failed to apply AGC ApplicationLoadBalancer for {lb.Name}: {ex.Message}",
Aspire.Hosting.Azure.Kubernetes.Tests (13)
AzureKubernetesInfrastructureTests.cs (7)
247exception.Message); 314exception.Message); 333exception.Message); 373exception.Message); 662Assert.Equal("The Azure resource scope value cannot be null or empty.", exception.Message); 681Assert.Equal("The Azure resource scope value cannot be null or empty.", exception.Message); 840Assert.Equal("The Azure resource scope value cannot be null or empty.", exception.Message);
AzureKubernetesIngressTests.cs (6)
150var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 152Assert.Contains("myapi", ex.Message); 153Assert.Contains("WithExternalHttpEndpoints", ex.Message); 172var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 174Assert.Contains("myapi", ex.Message); 175Assert.Contains("WithExternalHttpEndpoints", ex.Message);
Aspire.Hosting.Azure.Tests (51)
AzureAppServiceEnvironmentExtensionsTests.cs (2)
98Assert.Contains("not an Azure Container Registry", exception.Message); 99Assert.Contains("env", exception.Message);
AzureAppServiceTests.cs (3)
697Assert.Contains("there are no 'AzureAppServiceEnvironmentResource' resources", ex.Message); 1021Assert.Equal("App Service does not support resources with multiple external endpoints.", ex.Message); 1042Assert.Equal("App Service does not support resources with multiple external endpoints.", ex.Message);
AzureBicepProvisionerTests.cs (6)
146Assert.Contains("Azure principal parameter was not supplied", exception.Message); 456Assert.Contains("Azure__Location", exception.Message, StringComparison.Ordinal); 535Assert.Contains("Azure__Location", exception.Message, StringComparison.Ordinal); 1421Assert.Contains(ResourcesProvisioningState.Failed.ToString(), exception.Message); 1659Assert.Contains(resource.Name, exception.Message, StringComparison.Ordinal); 1684Assert.Contains(resource.Name, exception.Message, StringComparison.Ordinal);
AzureBicepResourceScopeTests.cs (2)
23Assert.Equal("The Azure Bicep resource scope does not target a resource group.", exception.Message); 33Assert.Equal("The Azure Bicep resource scope does not target a resource group.", exception.Message);
AzureContainerAppEnvironmentExtensionsTests.cs (7)
137Assert.Contains("not an Azure Container Registry", exception.Message); 138Assert.Contains("env", exception.Message); 330exception.Message); 477Assert.Contains("existing", ex.Message, StringComparison.OrdinalIgnoreCase); 478Assert.Contains("WithDelegatedSubnet", ex.Message); 511ex.Message); 535ex.Message);
AzureContainerAppsTests.cs (11)
860Assert.Equal("Automatic Key vault generation is not supported in this environment. Please create a key vault resource directly.", ex.Message); 1198Assert.Equal("The endpoint(s) 'foo' specify an unsupported transport. The supported transports are 'http', 'http2', and 'tcp'.", ex.Message); 1220Assert.Equal("Multiple external endpoints are not supported", ex.Message); 1240Assert.Equal("External non-HTTP(s) endpoints are not supported", ex.Message); 1261Assert.Equal("HTTP(s) and TCP endpoints cannot be mixed", ex.Message); 1814Assert.Contains("there are no 'AzureContainerAppEnvironmentResource' resources", ex.Message); 2014exception.Message); 2189exception.Message); 2218exception.Message); 2245Assert.Contains("'azd' resolve to 'cae-${resourceToken}'", exception.Message); 2246Assert.Contains("'cae' resolve to take('cae-${uniqueString(resourceGroup().id)}', 60)", exception.Message);
AzureCosmosDBExtensionsTests.cs (2)
1123Assert.Equal("CosmosClient is not initialized.", ex.Message); 1217Assert.Equal("CosmosClient is not initialized.", ex.Message);
AzureFrontDoorTests.cs (1)
249Assert.Contains("has already been added", exception.Message);
AzureNetworkSecurityGroupExtensionsTests.cs (1)
272Assert.Contains("shorthand", exception.Message);
AzureResourceOptionsTests.cs (1)
59output.WriteLine($"Failed to delete {tempDir.FullName} : {ex.Message}. Ignoring.");
AzureResourcePreparerTests.cs (1)
55Assert.Contains("role assignments", ex.Message);
AzureVirtualNetworkExtensionsTests.cs (2)
363exception.Message); 385exception.Message);
DefaultArmClientProviderTests.cs (2)
263Assert.Contains("to be deleted", exception.Message, StringComparison.Ordinal); 285Assert.Contains("to be purged", exception.Message, StringComparison.Ordinal);
DefaultAzurePrincipalProviderTests.cs (2)
150Assert.Contains("not a valid JWT", ex.Message); 166Assert.Contains("'oid'", ex.Message);
DurableTaskResourceExtensionsTests.cs (2)
131Assert.Contains("Unable to resolve the Durable Task Scheduler connection string", ex.Message); 256Assert.Contains("Unable to resolve the Durable Task Scheduler connection string", ex.Message);
FoundryExtensionsTests.cs (3)
487Assert.Contains("Foundry hosted agent 'advisor-agent-ha'", ex.Message); 488Assert.Contains("Endpoint 'http' on resource 'weather-agent' cannot be used", ex.Message); 489Assert.Contains("internal", ex.Message);
ProvisioningContextProviderTests.cs (3)
86Assert.Contains("Azure subscription id is required", exception.Message); 122Assert.Contains("Azure subscription id is required", exception.Message); 187Assert.Contains("azure location/region is required", exception.Message);
Aspire.Hosting.Blazor (2)
BlazorWasmAppBuilder.cs (2)
34result.StartException?.Message ?? "Process.Start returned null."); 73result.StartException?.Message ?? "Process.Start returned null.");
Aspire.Hosting.Blazor.Tests (1)
BlazorHostedExtensionsTests.cs (1)
279Assert.Contains("ResolveWebAssemblyProjectReferences", exception.Message);
Aspire.Hosting.Browsers (6)
BrowserConnectionDiagnosticsLogger.cs (2)
45var message = string.IsNullOrWhiteSpace(current.Message) 47: $"{current.GetType().Name}: {current.Message}";
BrowserLogsBuilderExtensions.cs (3)
168return CommandResults.Failure(ex.Message); 210return CommandResults.Failure(ex.Message); 268return CommandResults.Failure(ex.Message);
BrowserLogsConfigurationManager.cs (1)
315context.AddValidationError(userDataMode, ex.Message);
Aspire.Hosting.Browsers.Tests (17)
BrowserLogsBuilderExtensionsTests.cs (1)
398Assert.Contains(BrowserLogsBuilderExtensions.UserDataModeConfigurationKey, ex.Message);
BrowserLogsCdpConnectionTests.cs (2)
271Assert.Equal("Tracked browser CDP event handler failed.", exception.Message); 293Assert.Equal("Tracked browser CDP pipe is no longer active.", exception.Message);
BrowserLogsCdpProtocolTests.cs (2)
77Assert.Contains("Method not found", exception.Message); 78Assert.Contains("-32601", exception.Message);
BrowserLogsSessionManagerTests.cs (6)
158Assert.Contains("with profile 'Profile 1'", exception.Message); 159Assert.Contains("The requested profile is 'Profile 2'", exception.Message); 248Assert.Contains("1337", crashed?.Error?.Message); 368Assert.Contains("with profile 'Profile 1'", exception.Message); 369Assert.Contains("The requested profile is 'Default'", exception.Message); 529Assert.Contains("matched multiple Chromium profiles", exception.Message);
src\Aspire.Hosting.Browsers\BrowserConnectionDiagnosticsLogger.cs (2)
45var message = string.IsNullOrWhiteSpace(current.Message) 47: $"{current.GetType().Name}: {current.Message}";
src\Aspire.Hosting.Browsers\BrowserLogsBuilderExtensions.cs (3)
168return CommandResults.Failure(ex.Message); 210return CommandResults.Failure(ex.Message); 268return CommandResults.Failure(ex.Message);
src\Aspire.Hosting.Browsers\BrowserLogsConfigurationManager.cs (1)
315context.AddValidationError(userDataMode, ex.Message);
Aspire.Hosting.CodeGeneration.Rust.Tests (4)
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Hosting.CodeGeneration.TypeScript.Tests (8)
AtsTypeScriptCodeGeneratorTests.cs (4)
789Assert.Equal("Union input types must define at least one member type.", ex.Message); 1151Assert.Contains("SameNameResource", exception.Message); 1152Assert.Contains(typeof(TestTypes.NameCollisionOne.SameNameResource).FullName!, exception.Message); 1153Assert.Contains(typeof(TestTypes.NameCollisionTwo.SameNameResource).FullName!, exception.Message);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Hosting.Containers.Tests (4)
ContainerResourceBuilderTests.cs (3)
83Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message); 93Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message); 103Assert.Equal("The resource 'testcontainer' does not have a container image specified. Use WithImage to specify the container image and tag.", exception.Message);
WithDockerfileTests.cs (1)
640ex.Message
Aspire.Hosting.DevTunnels (5)
DevTunnelHealthCheck.cs (1)
74return HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelUnhealthy_Error, _tunnelResource.TunnelId, ex.Message), ex);
DevTunnelPortHealthCheck.cs (1)
44return HealthCheckResult.Unhealthy(string.Format(CultureInfo.CurrentCulture, Resources.MessageStrings.DevTunnelPortUnhealthy_Error, port, tunnelResource.TunnelId, ex.Message), ex);
DevTunnelResourceBuilderExtensions.cs (3)
154var exception = new DistributedApplicationException($"Error trying to create the dev tunnel resource '{tunnelResource.TunnelId}' this port belongs to: {ex.Message}", ex); 214portLogger.LogError(ex, "Error trying to create dev tunnel port '{Port}' on tunnel '{Tunnel}': {Error}", tunnelPort, portResource.DevTunnel.TunnelId, ex.Message); 930return RequiredCommandValidationResult.Failure(ex.Message);
Aspire.Hosting.DevTunnels.Tests (4)
DevTunnelCliClientTests.cs (1)
40exception.Message);
DevTunnelResourceBuilderExtensionsTests.cs (3)
343Assert.Equal("The dev tunnel 'tunnel' has not been associated with 'nonexistent' on resource 'target'. Use 'WithReference(target)' on the dev tunnel to expose this endpoint.", ex.Message); 365Assert.Equal("The dev tunnel 'tunnel' has not been associated with 'https' on resource 'target2'. Use 'WithReference(target2)' on the dev tunnel to expose this endpoint.", ex.Message); 383Assert.Equal("The dev tunnel 'tunnel' has not been associated with 'https' on resource 'target'. Use 'WithReference(target)' on the dev tunnel to expose this endpoint.", ex.Message);
Aspire.Hosting.Docker (2)
DockerComposeEnvironmentResource.cs (2)
439await deployTask.CompleteAsync($"Compose deployment failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false); 477await deployTask.CompleteAsync($"Compose shutdown failed ({runtime.Name}): {ex.Message}", CompletionState.CompletedWithError, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.Docker.Tests (2)
DockerComposeTests.cs (1)
107Assert.Contains("there are no 'DockerComposeEnvironmentResource' resources", ex.Message);
EnvVarEscaperTests.cs (1)
84Assert.Contains("Maximum recursion depth exceeded", ex.Message);
Aspire.Hosting.Dotnet (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Dotnet.Tests (2)
DotnetProjectResourceTests.cs (2)
908Assert.StartsWith($"{expectedSubject} Automatic project publishing", exception.Message); 911fragment => Assert.Contains(fragment, exception.Message));
Aspire.Hosting.EntityFrameworkCore (3)
EFCoreOperationExecutor.cs (1)
372return new EFOperationResult { Success = false, ErrorMessage = $"dotnet-ef command failed: {ex.Message}" };
EFResourceBuilderExtensions.cs (2)
443Message = executionConfiguration.Exception.Message 585Message = ex.Message
Aspire.Hosting.EntityFrameworkCore.Tests (11)
AddEFMigrationsTests.cs (4)
127Assert.Contains("TestDbContext", exception.Message); 128Assert.Contains("already been registered", exception.Message); 144Assert.Contains("AppDbContext", exception.Message); 145Assert.Contains("already been registered", exception.Message);
EFMigrationPipelineTests.cs (7)
561Assert.Contains("'.WaitFor(<database>)'", ex.Message); 578Assert.Contains("multiple resources", ex.Message); 579Assert.Contains("'db1'", ex.Message); 580Assert.Contains("'db2'", ex.Message); 635Assert.Contains("multiple resources", ex.Message); 636Assert.Contains("'db1'", ex.Message); 637Assert.Contains("'db2'", ex.Message);
Aspire.Hosting.Foundry (5)
FoundryExtensions.cs (2)
306logger.LogInformation("Foundry Local could not be started. Ensure it's installed correctly: https://learn.microsoft.com/azure/ai-foundry/foundry-local/get-started (Error: {Error}).", e.Message); 396logger.LogInformation("Failed to start {Model}. Error: {Error}", model, e.Message);
PromptAgent\AzurePromptAgentResource.cs (2)
288(ex.Message.Contains("Subdomain does not map to a resource", StringComparison.OrdinalIgnoreCase) || 289ex.Message.Contains("The project does not exist", StringComparison.OrdinalIgnoreCase));
PromptAgent\PromptAgentBuilderExtensions.cs (1)
107return CommandResults.Failure($"Failed to invoke agent: {ex.Message}");
Aspire.Hosting.Foundry.Tests (5)
AddProjectTests.cs (2)
57Assert.Equal(FoundryExtensions.LocalProjectsNotSupportedMessage, exception.Message); 70Assert.Equal(FoundryExtensions.LocalProjectsNotSupportedMessage, exception.Message);
HostedAgentConfigurationTests.cs (3)
106Assert.Equal("Foundry hosted agent for target resource 'target' must declare at least one protocol version.", ex.Message); 156ex.Message); 171ex.Message);
Aspire.Hosting.GitHub.Models (1)
GitHubModelsHealthCheck.cs (1)
66_result = HealthCheckResult.Unhealthy($"Failed to check GitHub Models endpoint: {ex.Message}", ex);
Aspire.Hosting.Java.Tests (46)
AddJavaAppPublishTests.cs (29)
159Assert.Contains("../agents/opentelemetry-javaagent.jar", exception.Message); 160Assert.Contains("outside the application directory", exception.Message); 209Assert.Contains("is a Windows path", exception.Message, StringComparison.Ordinal); 247Assert.Contains("there is no gradlew", ex.Message); 248Assert.Contains("gradle wrapper", ex.Message); 292Assert.Contains(jarPath, exception.Message); 293Assert.Contains("outside the directory the build runs in", exception.Message); 450exception.Message); 788exception.Message); 871Assert.Contains("there is no mvnw", ex.Message); 872Assert.Contains("mvn -N wrapper:wrapper", ex.Message); 894Assert.Contains("is outside the build context", ex.Message); 915Assert.Contains("is outside the build context", ex.Message); 938Assert.Contains("is outside the build context", ex.Message); 1023Assert.Contains("Windows batch script", ex.Message); 1050Assert.Contains($"{supportDirectory}/wrapper/{propertiesName}", ex.Message); 1617Assert.Contains(jarPath, exception.Message, StringComparison.Ordinal); 1618Assert.Contains("contains whitespace", exception.Message, StringComparison.Ordinal); 1634Assert.Contains("target/otel agents/javaagent.jar", exception.Message, StringComparison.Ordinal); 1635Assert.Contains("contains whitespace", exception.Message, StringComparison.Ordinal); 1752Assert.Contains("contains whitespace", ex.Message, StringComparison.Ordinal); 1901Assert.Contains("../shared/worker.jar", exception.Message, StringComparison.Ordinal); 1923Assert.Contains(jarPath, exception.Message, StringComparison.Ordinal); 1924Assert.Contains("outside the directory the build runs in", exception.Message, StringComparison.Ordinal); 1939Assert.Contains("outside the build context", exception.Message, StringComparison.Ordinal); 1954Assert.Contains("outside the build context", exception.Message, StringComparison.Ordinal); 2002Assert.Contains("its working directory was changed", exception.Message, StringComparison.Ordinal); 2003Assert.Contains(elsewhere.FullName, exception.Message, StringComparison.Ordinal); 2004Assert.Contains(sourceDir.FullName, exception.Message, StringComparison.Ordinal);
AddJavaAppTests.cs (11)
177exception.Message); 460exception.Message); 476exception.Message); 492exception.Message); 508exception.Message); 750Assert.Contains("has no mvnw", ex.Message); 751Assert.Contains("mvn -N wrapper:wrapper", ex.Message); 769Assert.Contains("has no gradlew", ex.Message); 770Assert.Contains("gradle wrapper", ex.Message); 859Assert.Contains(nameof(JavaHostingExtensions.WithWrapperPath), ex.Message); 860Assert.DoesNotContain("mvn -N wrapper:wrapper", ex.Message);
AddQuarkusAppTests.cs (1)
292ex.Message);
AddSpringBootAppTests.cs (5)
196ex.Message); 222runException.Message); 223Assert.Equal(runException.Message, publishException.Message); 343Assert.Contains("has no Maven or Gradle build configured", ex.Message, StringComparison.Ordinal);
Aspire.Hosting.JavaScript.Tests (16)
AddJavaScriptAppTests.cs (16)
205Assert.Contains("runScriptName", exception.Message); 206Assert.Contains("WithRunScript", exception.Message); 207Assert.Contains("Dockerfile", exception.Message); 224Assert.Contains("runScriptName", exception.Message); 225Assert.Contains("WithRunScript", exception.Message); 226Assert.Contains("Dockerfile", exception.Message); 242Assert.Contains("runScriptName", exception.Message); 243Assert.Contains("WithRunScript", exception.Message); 244Assert.Contains("Dockerfile", exception.Message); 269Assert.Contains("runScriptName", exception.Message); 270Assert.Contains("WithRunScript", exception.Message); 271Assert.Contains("Dockerfile", exception.Message); 339Assert.Contains("run script 'dev'", exception.Message); 340Assert.Contains("with args [--port, 8080]", exception.Message); 341Assert.Contains("Dockerfile", exception.Message); 530exception.Message);
Aspire.Hosting.Kubernetes (3)
Deployment\HelmDeploymentEngine.cs (3)
273$"Failed to prepare Helm chart values: {ex.Message}", 499$"Helm deployment failed: {ex.Message}", 626$"Helm uninstall failed: {ex.Message}",
Aspire.Hosting.Kubernetes.Tests (31)
HelmVersionValidatorTests.cs (6)
58Assert.Contains(trimmed, ex.Message, StringComparison.Ordinal); 59Assert.Contains(HelmVersionValidator.MinimumHelmVersion.ToString(), ex.Message, StringComparison.Ordinal); 60Assert.Contains("https://helm.sh/docs/intro/install/", ex.Message, StringComparison.Ordinal); 70Assert.Contains("garbage banner", ex.Message, StringComparison.Ordinal); 71Assert.Contains(HelmVersionValidator.MinimumHelmVersion.ToString(), ex.Message, StringComparison.Ordinal); 86Assert.Contains("https://helm.sh/docs/intro/install/", ex.Message, StringComparison.Ordinal);
KubernetesDeployTests.cs (1)
842Assert.Contains("not-a-version", ex.Message);
KubernetesEnvironmentResourceTests.cs (1)
53Assert.Contains("there are no 'KubernetesEnvironmentResource' resources", ex.Message);
KubernetesGatewayTests.cs (9)
196.First(e => e.Message.StartsWith("Gateway 'public'", StringComparison.Ordinal)); 203exception.Message); 547var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 549Assert.Contains("myapi", ex.Message); 550Assert.Contains("public", ex.Message); 551Assert.Contains("WithExternalHttpEndpoints", ex.Message); 570var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 572Assert.Contains("myapi", ex.Message); 573Assert.Contains("WithExternalHttpEndpoints", ex.Message);
KubernetesHelmChartTests.cs (2)
489Assert.Contains(resourceName, ex.Message); 490Assert.Contains("WithReleaseName", ex.Message, StringComparison.OrdinalIgnoreCase);
KubernetesIngressTests.cs (8)
747var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 749Assert.Contains("myapi", ex.Message); 750Assert.Contains("public", ex.Message); 751Assert.Contains("WithExternalHttpEndpoints", ex.Message); 770var ex = aggregate.Flatten().InnerExceptions.OfType<InvalidOperationException>().First(e => e.Message.Contains("WithExternalHttpEndpoints")); 772Assert.Contains("myweb", ex.Message); 773Assert.Contains("public", ex.Message); 774Assert.Contains("WithExternalHttpEndpoints", ex.Message);
KubernetesPublisherTests.cs (4)
1727Assert.Contains("service", ex.Message); 1728Assert.Contains("envA", ex.Message); 1729Assert.Contains("envB", ex.Message); 1730Assert.Contains("data", ex.Message);
Aspire.Hosting.Maui.Tests (13)
MauiBuildQueueTests.cs (1)
453Assert.Contains("MauiBuildInfoAnnotation", ex.Message);
MauiiOSValidationTests.cs (4)
38Assert.Contains("appears to be an iOS Simulator UDID", exception.Message); 39Assert.Contains("AddiOSSimulator", exception.Message); 63Assert.Contains("does not appear to be an iOS Simulator UDID", exception.Message); 64Assert.Contains("AddiOSDevice", exception.Message);
MauiPlatformExtensionsTests.cs (8)
148Assert.Contains("already exists", exception.Message); 296Assert.Contains($"Unable to detect {config.DisplayName}", exception.Message, StringComparison.OrdinalIgnoreCase); 809Assert.Contains("requires the Aspire dashboard", exception.Message); 834Assert.Contains("does not have an allocated OTLP endpoint", exception.Message); 835Assert.Contains(KnownEndpointNames.OtlpGrpcEndpointName, exception.Message); 836Assert.Contains(KnownEndpointNames.OtlpHttpEndpointName, exception.Message); 854Assert.Contains(KnownConfigNames.DashboardOtlpGrpcEndpointUrl, exception.Message); 855Assert.Contains("not a url", exception.Message);
Aspire.Hosting.OpenAI (1)
OpenAIModelHealthCheck.cs (1)
58_result = HealthCheckResult.Unhealthy($"Failed to check OpenAI endpoint: {ex.Message}", ex);
Aspire.Hosting.Python.Tests (1)
AddPythonAppTests.cs (1)
1208Assert.Contains("Python environment annotation", exception.Message);
Aspire.Hosting.Radius (2)
Publishing\RadiusBicepPublishingContext.cs (1)
120context.ReportingStep.Log(LogLevel.Error, ex.Message);
Publishing\RadiusDeploymentPipelineStep.cs (1)
239context.ReportingStep.Log(LogLevel.Error, ex.Message);
Aspire.Hosting.Radius.Tests (105)
CloudProviders\ConflictingCredentialsTests.cs (4)
35Assert.Contains("ASPIRERADIUS011", ex.Message); 36Assert.Contains("Azure", ex.Message); 71Assert.Contains("ASPIRERADIUS011", ex.Message); 72Assert.Contains("AWS", ex.Message);
CloudProviders\WithAwsProviderTests.cs (1)
89Assert.Contains("ASPIRERADIUS010", ex.Message);
CloudProviders\WithAzureProviderTests.cs (1)
85Assert.Contains("ASPIRERADIUS010", ex.Message);
Deployment\RadCliDetectionTests.cs (4)
54Assert.Contains(RadiusDeploymentPipelineStep.RadInstallUrl, ex.Message, StringComparison.Ordinal); 55Assert.Contains("rad", ex.Message, StringComparison.Ordinal); 56Assert.Contains("install", ex.Message, StringComparison.OrdinalIgnoreCase); 57Assert.Contains("PATH", ex.Message, StringComparison.Ordinal);
InnerLoop\MultiEnvironmentTests.cs (2)
48Assert.Contains("'api'", ex.Message); 49Assert.Contains("WithComputeEnvironment", ex.Message);
Publishing\BicepGenerationSimpleTests.cs (2)
172Assert.Contains("webapp", ex.Message); 173Assert.Contains("WithContainerImage", ex.Message);
Publishing\BicepIdentifierTests.cs (2)
81Assert.Contains("ASPIRERADIUS056", ex!.Message); 82Assert.Contains(reservedName, ex.Message);
Publishing\ConfigureRadiusInfrastructureTests.cs (22)
328Assert.Contains("api", ex.Message); 329Assert.Contains("renamed", ex.Message); 379Assert.Contains("api", ex.Message); 380Assert.Contains("non-literal", ex.Message); 409Assert.Contains("http", ex.Message); 410Assert.Contains("5000", ex.Message); 411Assert.Contains("9999", ex.Message); 435Assert.Contains("http", ex.Message); 436Assert.Contains("removed", ex.Message); 465Assert.Contains("http", ex.Message); 466Assert.Contains("TCP", ex.Message); 467Assert.Contains("UDP", ex.Message); 496Assert.Contains("http", ex.Message); 497Assert.Contains("non-literal", ex.Message); 546Assert.Contains("api", ex.Message); 547Assert.Contains("removed or replaced", ex.Message); 577Assert.Contains($"{longName}-{longName}", ex.Message); 578Assert.Contains("63", ex.Message); 601Assert.Contains($"{longName}-{longName}", ex.Message); 602Assert.Contains("63", ex.Message); 632Assert.Contains("api", ex.Message); 633Assert.Contains("5000/TCP", ex.Message);
Publishing\SealedSecretPublishTests.cs (3)
95Assert.Contains("ASPIRERADIUS044", ex.Message); 119Assert.Contains("ASPIRERADIUS044", ex.Message); 120Assert.Contains("spec.encryptedData", ex.Message);
Recipes\RecipeParameterAdvancedTests.cs (3)
168Assert.Contains("AWS", ex.Message); 205Assert.Contains("ASPIRERADIUS028", ex.Message); 227Assert.Contains("ASPIRERADIUS056", ex.Message);
Secrets\AddRadiusSecretStoreTests.cs (4)
137Assert.Contains("ASPIRERADIUS065", ex.Message); 160Assert.Contains("ASPIRERADIUS043", ex.Message); 210Assert.Contains("ASPIRERADIUS065", ex.Message); 222Assert.Contains("ASPIRERADIUS065", ex.Message);
Secrets\SealedSecretApplyStepTests.cs (21)
281Assert.Contains("db-creds", ex.Message); 435Assert.Contains("ASPIRERADIUS058", ex.Message); 436Assert.Contains("no key could decrypt secret", ex.Message); 452Assert.Contains("ASPIRERADIUS058", ex.Message); 453Assert.Contains("--update-status=false", ex.Message); 454Assert.Contains("updateStatus: false", ex.Message); 455Assert.Contains("app/db-creds", ex.Message); 512Assert.Contains("ASPIRERADIUS058", ex.Message); 535Assert.Contains("ASPIRERADIUS058", ex.Message); 586Assert.Contains("ASPIRERADIUS058", ex.Message); 587Assert.Contains("app/db-creds", ex.Message); 588Assert.Contains("db-creds", ex.Message); 812Assert.Contains("ASPIRERADIUS066", ex.Message); 813Assert.Contains("apply", ex.Message); 844Assert.Contains("ASPIRERADIUS066", ex.Message); 845Assert.Contains("verify", ex.Message); 846Assert.Contains("db-creds", ex.Message); 847Assert.Contains("app/db-creds", ex.Message); 872Assert.Contains("ASPIRERADIUS059", ex.Message); 873Assert.Contains("~/.rad/config.yaml", ex.Message); 874Assert.Contains("ASPIRE_RADIUS_KUBE_CONTEXT", ex.Message);
Secrets\SealedSecretManifestTests.cs (30)
97Assert.Contains("ASPIRERADIUS044", ex.Message); 115Assert.Contains("ASPIRERADIUS044", ex.Message); 137Assert.Contains("ASPIRERADIUS044", ex.Message); 158Assert.Contains("ASPIRERADIUS044", ex.Message); 178Assert.Contains("ASPIRERADIUS044", ex.Message); 179Assert.Contains("plaintext", ex.Message); 194Assert.Contains("ASPIRERADIUS044", ex.Message); 209Assert.Contains("ASPIRERADIUS044", ex.Message); 229Assert.Contains("ASPIRERADIUS044", ex.Message); 230Assert.Contains("multiple YAML", ex.Message); 254Assert.Contains("ASPIRERADIUS044", ex.Message); 255Assert.Contains("multiple YAML", ex.Message); 384Assert.Contains("ASPIRERADIUS044", ex.Message); 407Assert.Contains("ASPIRERADIUS063", ex.Message); 430Assert.Contains("ASPIRERADIUS063", ex.Message); 451Assert.Contains("ASPIRERADIUS063", ex.Message); 476Assert.Contains("ASPIRERADIUS063", ex.Message); 498Assert.Contains("ASPIRERADIUS063", ex.Message); 519Assert.Contains("ASPIRERADIUS044", ex.Message); 543Assert.Contains("ASPIRERADIUS063", ex.Message); 564Assert.Contains("ASPIRERADIUS063", ex.Message); 654Assert.Contains("ASPIRERADIUS063", ex.Message); 676Assert.Contains("ASPIRERADIUS063", ex.Message); 698Assert.Contains("ASPIRERADIUS063", ex.Message); 720Assert.Contains("ASPIRERADIUS063", ex.Message); 779Assert.Contains("ASPIRERADIUS044", ex.Message); 780Assert.Contains("spec.encryptedData", ex.Message); 814Assert.Contains("ASPIRERADIUS044", ex.Message); 815Assert.Contains("spec.encryptedData", ex.Message); 855Assert.Contains("ASPIRERADIUS063", ex.Message);
Secrets\SecretStoreValidationTests.cs (6)
45return ex.Message; 98Assert.Contains("ASPIRERADIUS068", ex.Message); 99Assert.Contains("appsecrets", ex.Message); 175Assert.Contains("ASPIRERADIUS065", ex.Message); 380Assert.Contains("ASPIRERADIUS055", ex.Message); 381Assert.Contains("metadata.namespace", ex.Message);
Aspire.Hosting.RemoteHost (18)
Ats\AtsMarshaller.cs (3)
245$"Failed to deserialize DTO '{targetType.Name}': {ex.Message}"); 329$"Callback proxy factory not available: {ex.Message}"); 685var message = ex.Message;
Ats\CapabilityDispatcher.cs (2)
602_logger.LogError(ex, "Capability {CapabilityId} failed with {ExceptionType}: {Message}", capabilityId, ex.GetType().Name, ex.Message); 672throw new InvalidOperationException(ex.Message, ex);
Ats\PolyglotCapabilityInvocationException.cs (2)
103Message = Message, 139var scrubbedMessage = ScrubMessage(exception.Message, polyglotMethodName, clrMemberName, polyglotMethodNamesByClrName);
AtsCapabilityScanner.cs (4)
465diagnostics.Add(AtsDiagnostic.Error(ex.Message, $"{type.FullName}.{method.Name}")); 1293$"Skipping [AspireValue] on '{declaringType.FullName}.{memberName}': {ex.Message}", 1768diagnostics.Add(AtsDiagnostic.Error(ex.Message, $"{fullName}.{property.Name}")); 1928diagnostics.Add(AtsDiagnostic.Error(ex.Message, $"{contextType.FullName}.{method.Name}"));
CodeGeneration\CodeGeneratorResolver.cs (1)
210? string.Join("; ", loaders.Where(e => e is not null).Select(e => e!.Message).Distinct())
Diagnostics\RemoteHostProfilingTelemetry.cs (2)
450activity.SetStatus(ActivityStatusCode.Error, exception.Message); 454[Tags.ExceptionMessage] = exception.Message
Language\LanguageSupportResolver.cs (1)
84? string.Join("; ", loaders.Where(e => e is not null).Select(e => e!.Message).Distinct())
RemoteAppHostService.cs (3)
158_logger.LogError(ex, " invokeCapability({CapabilityId}) Exception: {ExceptionType} - {Message}", capabilityId, ex.GetType().Name, ex.Message); 165? $"{ex.Message} {skewExplanation}" 166: ex.Message;
Aspire.Hosting.RemoteHost.Tests (57)
AtsMarshallerTests.cs (1)
718Assert.Contains("AspireDto", ex.Message);
CallbackProxyTests.cs (2)
240Assert.Equal("Callback failed", ex.Message); 255Assert.Equal("Callback with result failed", ex.Message);
CapabilityDispatcherTests.cs (39)
117Assert.Contains("Handler failed", ex.Message); 169Assert.Contains("A parameter value is required", ex.Message); 227Assert.Contains("The value is invalid", ex.Message); 283Assert.Contains("context", ex.Message); 525Assert.Contains("value", ex.Message); 883Assert.Contains("callback", ex.Message.ToLower()); 930Assert.Contains("Async error", ex.Message); 1491Assert.Contains("only supports string-key dictionaries", ex.Message); 1755Assert.Contains("parameter 'context'", ex.Message); 1756Assert.Contains("TestResourceWithProperties", ex.Message); 1779Assert.Contains("Could not invoke 'withReference' on resource 'frontend'", ex.Message); 1780Assert.Contains("parameter 'source' expects a resource builder for a resource with a connection string", ex.Message); 1781Assert.Contains("a resource builder for a TestResourceWithProperties named 'backend'", ex.Message); 1782Assert.DoesNotContain("Aspire.Hosting.", ex.Message); 1802Assert.Contains("Could not invoke 'withEndpoint' on resource 'api'", ex.Message); 1803Assert.Contains("Multiple calls to withEndpoint can conflict.", ex.Message); 1804Assert.DoesNotContain("WithEndpoint", ex.Message); 1824Assert.Contains("Endpoint with name 'http' already exists on resource 'officiator'.", ex.Message); 1825Assert.Contains("Multiple calls to withEndpoint", ex.Message); 1826Assert.DoesNotContain("WithEndpoint", ex.Message); 1846Assert.Contains("expects a resource builder for a resource with endpoints", ex.Message); 1847Assert.Contains("got resource 'officiator'", ex.Message); 1867Assert.Contains("expects a resource builder for a resource with endpoints", ex.Message); 1868Assert.Contains("got a resource builder for a TestResourceWithProperties named 'backend'", ex.Message); 1894Assert.Contains("Could not invoke 'setColor' on resource 'frontend'", ex.Message); 1895Assert.Contains("parameter 'value' expects a string", ex.Message); 1896Assert.Contains("named 'backend'", ex.Message); 1949Assert.Equal("Could not invoke 'withEndpoint' on resource 'orders': withEndpoint failed. Try again.", capabilityException.Message); 1950Assert.DoesNotContain("WithEndpoint", capabilityException.Message); 1977capabilityException.Message); 1978Assert.DoesNotContain('\r', capabilityException.Message); 2005Assert.Contains("Could not invoke 'withReference' on resource 'frontend'", capabilityException.Message); 2006Assert.Contains("resource builder for a TestResourceWithProperties named 'backend'", capabilityException.Message); 2026Assert.Equal("Could not invoke 'createGlobal': createGlobal failed.", capabilityException.Message); 2027Assert.DoesNotContain("on resource", capabilityException.Message); 2057Assert.DoesNotContain("dotnet dev-certs", capabilityException.Message); 2058Assert.DoesNotContain("go.microsoft.com/fwlink", capabilityException.Message); 2059Assert.Contains("aspire certs trust", capabilityException.Message); 2060Assert.Contains("https://aspire.dev/docs/", capabilityException.Message);
CodeGeneration\ApiReferenceExportTests.cs (5)
141Assert.Contains("9.9.9", versionMismatch.Message, StringComparison.Ordinal); 165Assert.Contains("No code generator found for language: klingon", ex.Message); 166Assert.Contains("Available languages:", ex.Message); 180Assert.Contains("Go", ex.Message, StringComparison.Ordinal); 181Assert.Contains(nameof(IApiReferenceExporter), ex.Message, StringComparison.Ordinal);
CodeGenerationDiagnosticBuilderTests.cs (3)
39Assert.False(string.IsNullOrWhiteSpace(localRpc.Message)); 41Assert.DoesNotContain("TypeLoadException", localRpc.Message, StringComparison.Ordinal); 54Assert.False(string.IsNullOrWhiteSpace(localRpc.Message));
IntegrationPackageProbeManifestTests.cs (2)
16Assert.Equal("Integration package probe manifest path is invalid.", exception.Message); 44Assert.Equal("Integration package probe manifest entry path 'managedAssemblies[].path' is invalid.", exception.Message);
JsonRpcAuthenticationTests.cs (1)
51Assert.Contains("Client must authenticate before invoking AppHost RPC methods.", ex.Message);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Hosting.Rust (1)
CargoMetadataReader.cs (1)
94$"or supply your own Dockerfile in '{workingDirectory}'. {ex.Message}", ex);
Aspire.Hosting.Rust.Tests (13)
AddRustAppPublishTests.cs (6)
162exception.Message); 187exception.Message); 213exception.Message); 239exception.Message); 270exception.Message); 1154Assert.Skip($"Symbolic links are unavailable in this test environment: {ex.Message}");
CargoMetadataTests.cs (2)
74exception.Message); 329Assert.Contains("Cargo.toml", exception.Message);
RustCargoTargetResolverTests.cs (4)
160exception.Message); 175exception.Message); 193exception.Message); 207exception.Message);
RustPublicApiTests.cs (1)
348Assert.Contains("have not been resolved", exception.Message);
Aspire.Hosting.Sdk.Tests (4)
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Hosting.Tasks (4)
GetNonExecutableReferences.cs (1)
55Log.LogWarning($"Failed to validate Aspire host project resources: {ex.Message}. To disable this validation, set the MSBuild property 'SkipValidateAspireHostProjectResources' to 'true'.");
ResolveAspireCliInvocation.cs (1)
207Log.LogMessage(MessageImportance.Low, "Failed to inspect SDKs through '{0}': {1}", dotnetPath, ex.Message);
RunAspireCliCommand.cs (2)
95FailureMessage = $"The command '{FileName}' could not be started: {ex.Message}"; 191FailureMessage = $"The timed-out command '{FileName}' could not be terminated: {ex.Message}";
Aspire.Hosting.Testing (1)
src\Shared\LaunchProfiles\LaunchSettingsReader.cs (1)
53throw new DistributedApplicationException(ex.Message, ex.InnerException ?? ex);
Aspire.Hosting.Testing.Tests (11)
DashboardTestingBuilderTests.cs (2)
158Assert.Equal(TestingResources.DashboardTestingPublishModeExceptionMessage, exception.Message); 171Assert.Equal(TestingResources.DashboardTestingPublishModeExceptionMessage, exception.Message);
DashboardUrlTests.cs (4)
247Assert.Equal(TestingResources.DashboardDisabledExceptionMessage, exception.Message); 283Assert.Equal(TestingResources.DashboardUrlApplicationNotStartedExceptionMessage, exception.Message); 295Assert.Equal(TestingResources.DashboardUrlPublishModeExceptionMessage, exception.Message); 316Assert.Contains(KnownResourceNames.AspireDashboard, exception.Message, StringComparison.Ordinal);
TestingBuilderTests.cs (3)
81Assert.Contains("does not have an entry point", ioe.Message); 466Assert.Contains(crashArg, exception.Message); 484Assert.Contains(crashArg, exception.Message);
TestingFactoryCrashTests.cs (1)
28Assert.Contains(crashArg, exception.Message);
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
134_testOutputHelper.WriteLine($"Failed to read DCP log {logFile}: {ex.Message}");
Aspire.Hosting.Tests (212)
ApplicationModel\ResourceCollectionTests.cs (2)
147Assert.Contains("res", ex.Message); 148Assert.Contains(nameof(TestResource), ex.Message);
Backchannel\AppHostRpcTargetUploadTests.cs (3)
95Assert.Equal($"File input '{inputName}' accepts at most 1 file.", exception.Message); 115Assert.Equal(expectedMessage, exception.Message); 134Assert.Contains("exceeds the maximum upload size of 1 bytes", exception.Message);
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (2)
1517Assert.Equal("Resource 'myresource' failed to become healthy before the operation was cancelled.", exception.Message); 1552Assert.Equal("Resource 'myresource-abc123' failed to become healthy before the operation was cancelled.", exception.Message);
Backchannel\AuxiliaryBackchannelTests.cs (2)
341Assert.Contains("not found", ex.Message, StringComparison.OrdinalIgnoreCase); 382Assert.Contains("MCP endpoint annotation", ex.Message, StringComparison.OrdinalIgnoreCase);
BuildOnlyContainerValidationTests.cs (6)
32Assert.Contains("'orphan'", ex.Message); 33Assert.DoesNotContain("'frontend'", ex.Message); 34Assert.Contains("PublishWithContainerFiles", ex.Message); 35Assert.Contains("builder.Pipeline.DisableBuildOnlyContainerValidation", ex.Message); 53Assert.Contains("'orphan'", ex.Message); 54Assert.DoesNotContain("'frontend'", ex.Message);
ComputeEnvironmentValidationTests.cs (5)
27Assert.Contains("'api'", ex.Message); 28Assert.Contains("'env1'", ex.Message); 29Assert.Contains("'env2'", ex.Message); 30Assert.Contains("WithComputeEnvironment", ex.Message); 94Assert.Contains("Endpoint 'redis' must specify a port for scheme 'redis'.", ex.Message);
ContainerRegistryResourceTests.cs (3)
617Assert.Contains("multiple container registries", exception.Message); 618Assert.Contains("WithContainerRegistry", exception.Message); 631Assert.Contains("does not have a container registry reference", exception.Message);
Dashboard\DashboardServiceTests.cs (1)
1195Assert.Equal("Submitted files for input 'File' do not match the completed uploads.", exception.Message);
Dashboard\InteractionFileUploadStoreTests.cs (7)
350Assert.Equal($"File input '{InputName}' accepts at most {maxFileCount} {fileLabel}.", exception.Message); 376Assert.Equal($"Interaction '{InteractionId}' is not accepting file uploads for input 'OtherFile'.", exception.Message); 453Assert.Equal($"Submitted files for input '{InputName}' do not match the completed uploads.", exception.Message); 470Assert.Equal("Submitted files for input 'OtherFile' do not match the completed uploads.", exception.Message); 486Assert.Equal($"Submitted files for input '{InputName}' do not match the completed uploads.", exception.Message); 500Assert.Equal($"Submitted files for input '{InputName}' do not match the completed uploads.", exception.Message); 531Assert.Equal($"Interaction '{InteractionId}' is not accepting file uploads.", exception.Message);
Dcp\DcpCliArgsTests.cs (2)
185Assert.Contains(KnownConfigNames.ProxylessEndpointPortRange, exception.Message); 186Assert.Contains("start-end", exception.Message);
Dcp\DcpExecutorTests.cs (16)
468Assert.Contains("container tunnel container name", ex.Message); 490Assert.Contains("container tunnel container name", ex.Message); 512Assert.Contains("container tunnel container name", ex.Message); 762Assert.Contains("cannot be proxied when both TargetPort and Port are specified with the same value", exception.Message); 1448Assert.Contains(tc.ErrorMessageFragment, exception.Message); 3672Assert.Contains(tc.ErrorMessageFragment, exception.Message); 4145Assert.Equal($"Failed to delete '{dcpCtr.Metadata.Name}' successfully before restart.", ex.Message); 4148Assert.Equal(ex.Message, failedContext.ErrorMessage); 5151Assert.Equal("Resource 'project' uses multiple replicas and a persistent lifetime. These features do not work together.", exception.Message); 5169Assert.Equal("Resource 'worker' uses multiple replicas and a persistent lifetime. These features do not work together.", exception.Message); 5561Assert.Equal(expectedMessage, exception.Message); 5563Assert.Equal(innerMessage, innerException.Message); 8591Assert.Contains("Failed to apply launch configuration", exception.Message); 8592Assert.Contains("does not retry launch configuration failures using DCP process fallback", exception.Message); 8723Assert.Contains("Failed to apply launch configuration", exception.Message); 8724Assert.Contains("does not retry launch configuration failures using DCP process fallback", exception.Message);
Dcp\ExecutableLaunchPlanTests.cs (1)
227exception.Message);
Dcp\ProcessUtilTests.cs (8)
53Assert.Contains("returned non-zero exit code 1", exception.Message); 54Assert.Contains("stdout-final-line", exception.Message); 55Assert.Contains("stderr-final-line", exception.Message); 126Assert.Contains("returned non-zero exit code 7", exception.Message); 127Assert.Contains("failure-argument", exception.Message); 128Assert.Contains("-- failure-argument \"failure argument\" \"quote\\\"argument\" \"\"", exception.Message); 193var outputLines = exception.Message.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 196Assert.Contains("Command output truncated: showing last 50 of 52 lines.", exception.Message);
Dcp\ResourceSnapshotBuilderTests.cs (2)
146Assert.Contains(project.Name, exception.Message); 147Assert.Contains("more than one", exception.Message);
Dcp\TestKubernetesService.cs (2)
266throw new HttpOperationException(ex.Message) 268Response = new HttpResponseMessageWrapper(new HttpResponseMessage { StatusCode = System.Net.HttpStatusCode.NotFound }, ex.Message)
DebugSupportExtensionsTests.cs (5)
293Assert.Contains("does not declare debug launch support", exception.Message); 309Assert.Contains("has no project metadata", exception.Message); 321Assert.Contains("returned null", exception.Message); 322Assert.Contains("app", exception.Message); 323Assert.Contains("go", exception.Message);
DistributedApplicationBuilderExtensionsTests.cs (2)
14Assert.Contains("not found", missingException.Message); 23Assert.Contains("not assignable", incorrectTypeException.Message);
DistributedApplicationBuilderTests.cs (2)
294Assert.Equal("Cannot add resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with name 'Test' because resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with that name already exists. Resource names are case-insensitive.", ex.Message); 305Assert.Equal("Cannot add resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with name 'TEST' because resource of type 'Aspire.Hosting.ApplicationModel.ContainerResource' with that name already exists. Resource names are case-insensitive.", ex.Message);
DistributedApplicationTests.cs (6)
82Assert.Equal(exceptionMessage, ex.Message); 127Assert.Equal(exceptionMessage, ex.Message); 156Assert.Equal(exceptionMessage, ex.Message); 709Assert.Equal(exceptionMessage, ex.InnerExceptions.First().Message); 1682Assert.Equal($"Resource '{testName}-servicea' uses multiple replicas and a proxy-less endpoint 'http'. These features do not work together.", ex.Message); 1986Assert.Equal($"The endpoint 'tcp' for container resource '{testName}-redis' must specify the TargetPort value", ex.Message);
EndpointReferenceTests.cs (14)
222Assert.Equal("The endpoint `http` is not allocated for the resource `test`.", ex.Message); 235Assert.Equal("The endpoint `http` is not allocated for the resource `test`.", ex.Message); 248Assert.Equal("The endpoint `http` is not allocated for the resource `test`.", ex.Message); 421Assert.Contains("`https`", ex.Message); 422Assert.Contains("`api-boston`", ex.Message); 423Assert.Contains("Available endpoints", ex.Message); 424Assert.Contains("`http`", ex.Message); 437Assert.Contains("`https`", ex.Message); 438Assert.Contains("`http`", ex.Message); 439Assert.Contains("`grpc`", ex.Message); 450Assert.Contains("`https`", ex.Message); 451Assert.Contains("`api`", ex.Message); 452Assert.Contains("no endpoints defined", ex.Message); 464Assert.Equal("custom message", ex.Message);
ExecutionConfigurationGathererTests.cs (4)
230Assert.Contains("`https`", inner.Message); 231Assert.Contains("`api`", inner.Message); 232Assert.Contains("Available endpoints", inner.Message); 265Assert.Contains("`https`", inner.Message);
ExternalServiceTests.cs (8)
198Assert.Equal("The URL parameter 'nuget-url' for source resource 'nuget' is invalid while configuring target resource 'project': The URL for the external service must be an absolute URI.", ex.Message); 217Assert.Equal("The URL parameter 'nuget-url' for source resource 'nuget' is invalid while configuring target resource 'project': The URL for the external service must be an absolute URI.", ex.Message); 587Assert.Contains("reference 'api'", ex.Message); 588Assert.Contains("target resource 'project'", ex.Message); 589Assert.Contains("fragment", ex.Message); 601Assert.Contains("reference 'api'", ex.Message); 602Assert.Contains("target resource 'project'", ex.Message); 603Assert.Contains("query string", ex.Message);
HealthCheckTests.cs (3)
34ex.Message 54ex.Message 75ex.Message
InteractionServiceTests.cs (3)
746Assert.Contains("Duplicate input name 'Duplicate' found", exception.Message); 761Assert.Contains("Duplicate input name 'USERNAME' found", exception.Message); 846Assert.Contains("No input with name 'Invalid' was found", exception.Message);
Orchestrator\ApplicationOrchestratorTests.cs (1)
356Assert.Contains("Circular dependency detected", e.Message);
Pipelines\DistributedApplicationPipelineTests.cs (37)
327Assert.Contains("A step with the name 'step1' has already been added", ex.Message); 328Assert.Contains("step1", ex.Message); 342Assert.Contains("depends on unknown step", ex.Message); 343Assert.Contains("unknown-step", ex.Message); 357Assert.Contains("required by unknown step", ex.Message); 358Assert.Contains("unknown-step", ex.Message); 387Assert.Contains("Circular dependency", ex.Message); 388Assert.Contains("step1", ex.Message); 389Assert.Contains("step2", ex.Message); 408Assert.Contains("failing-step", ex.Message); 409Assert.Contains("failed", ex.Message); 411Assert.Equal(exceptionMessage, ex.InnerException.Message); 555Assert.Contains("Step 'step1' is required by unknown step 'unknown-step'", exception.Message); 576Assert.Contains("Step 'step2' is required by unknown step 'unknown-step'", exception.Message); 611Assert.Contains("A step with the name 'step1' has already been added to the pipeline", exception.Message); 637Assert.Contains("Duplicate step name", exception.Message); 638Assert.Contains("duplicate-step", exception.Message); 659Assert.Contains("failing-step", exception.Message); 699Assert.Contains("failing-dependency", ex.Message); 700Assert.Contains("failed", ex.Message); 738Assert.Contains("Circular dependency", ex.Message); 740Assert.True(ex.Message.Contains("stepA") || ex.Message.Contains("stepB") || ex.Message.Contains("stepC"), 896Assert.Contains("failing-step", ex.Message); 897Assert.Contains("failed", ex.Message); 1831Assert.Contains("Step 'non-existent-step' not found in pipeline", ex.Message); 1832Assert.Contains("Available steps:", ex.Message); 1833Assert.Contains("'step1'", ex.Message); 1834Assert.Contains("'step2'", ex.Message); 1835Assert.Contains("'step3'", ex.Message); 2145Assert.Contains("no container registry is available", exception.Message); 2146Assert.Contains("test-project", exception.Message); 2166Assert.Contains("no container registry is available", exception.Message); 2167Assert.Contains("test-project", exception.Message); 2194Assert.Contains("Destination set to Archive but OutputPath is not configured", exception.Message); 2195Assert.Contains("test-project", exception.Message);
ProjectResourceBuilderExtensionTests.cs (8)
71Assert.Contains(nameof(IProjectMetadata), exception.Message); 72Assert.Contains(executable.Resource.Name, exception.Message); 91Assert.Contains("already been applied", exception.Message); 92Assert.Contains(project.Resource.Name, exception.Message); 121Assert.Contains(project.Resource.Name, exception.Message); 122Assert.Contains("more than one", exception.Message); 138Assert.Contains(project.Resource.Name, exception.Message); 139Assert.Contains(expectedMessage, exception.Message);
ProjectResourceTests.cs (7)
89Assert.Equal(expectedMessage, ex.Message); 348Assert.Equal("Project file 'another-path' was not found.", ex.Message); 358Assert.Equal("Launch settings file does not contain 'not-exist' profile.", ex.Message); 1022Assert.Contains("projectName", exception.Message); 1023Assert.Contains("more than one", exception.Message); 1032Assert.Contains("projectName", exception.Message); 1033Assert.Contains(nameof(IProjectMetadata), exception.Message);
PublishAsDockerfileTests.cs (5)
460Assert.Equal("The resource 'api' does not have a Dockerfile build annotation. Call WithDockerfile before calling WithBuildArg.", exception.Message); 476Assert.Equal("Cannot add secret parameter 'secret-param' as build argument 'ARG1' while configuring resource 'api'. Use WithBuildSecret instead.", exception.Message); 489Assert.Equal("The resource 'api' does not have a Dockerfile build annotation. Call WithDockerfile before calling WithBuildSecret.", exception.Message); 499Assert.Equal("Project metadata was not found for resource 'project-without-metadata'.", exception.Message); 509Assert.Equal("Could not get the container image name for resource 'container-without-image'.", exception.Message);
Publishing\ContainerRuntimeBaseTests.cs (3)
24Assert.Contains("Test command failed with exit code 1.", exception.Message); 25Assert.Contains("stdout-final-line", exception.Message); 26Assert.Contains("stderr-final-line", exception.Message);
Publishing\DeploymentStateManagerTests.cs (2)
81Assert.Contains("Concurrency conflict detected in section 'Parameters'", exception.Message); 317Assert.Contains("Concurrency conflict detected in section 'Parent:Child:Grandchild'", exception.Message);
Publishing\PipelineActivityReporterTests.cs (8)
152Assert.Contains("Step with ID 'non-existent-step' does not exist", exception.Message); 170Assert.Contains($"Cannot create task for step '{stepInternal.Id}' because the step is already complete.", exception.Message); 256Assert.Contains("Parent step with ID 'non-existent-step' does not exist", exception.Message); 274Assert.Contains($"Cannot update task '{taskInternal.Id}' because its parent step", exception.Message); 328Assert.Contains($"Cannot complete task '{taskInternal.Id}' because its parent step", exception.Message); 549Assert.Contains($"Cannot update task '{taskInternal.Id}' because its parent step", updateException.Message); 559Assert.Contains($"Cannot create task for step '{stepInternal.Id}' because the step is already complete.", createException.Message); 706Assert.Equal("Submitted files for input 'artifact' do not match the completed uploads.", exception.Message);
Publishing\ResourceContainerImageManagerTests.cs (7)
494Assert.Equal("Fake container runtime is configured to fail", exception.Message); 632Assert.Contains("Container runtime", exception.Message); 633Assert.Contains("is not running or is unhealthy", exception.Message); 1401Assert.Contains("is not running or is unhealthy", exception.Message); 1436Assert.Contains("is not running or is unhealthy", exception.Message); 1479Assert.Contains("is not running or is unhealthy", exception.Message); 1512Assert.Contains("is not running or is unhealthy", exception.Message);
ResourceBuilderLifetimeTests.cs (3)
37Assert.Contains("does not support lifetime configuration", exception.Message); 140Assert.Contains("does not support lifetime configuration", exception.Message); 154Assert.Contains("circular lifetime reference", exception.Message);
ResourceNotificationTests.cs (8)
834Assert.Contains("- Waiting For:", ex.Message); 835Assert.Contains(" - dependency: State = Running, Health = Healthy", ex.Message); 868Assert.Contains("Resource 'resource' failed to wait for dependencies before the operation was cancelled.", ex.Message); 869Assert.Contains("- Waiting For:", ex.Message); 870Assert.Contains(" - dependency: State = Starting", ex.Message); 1334Assert.Equal("ResourceReady failed", ex.Message); 1388Assert.Contains("does-not-exist", ex.Message); 1389Assert.Contains("does not exist in the application model", ex.Message);
WaitForTests.cs (8)
51Assert.Equal("The 'test' resource cannot wait for itself.", waitForEx.Message); 58Assert.Equal("The 'test' resource cannot wait for itself.", waitForCompletionEx.Message); 73Assert.Equal("The 'child' resource cannot wait for its parent 'parent'.", waitForEx.Message); 80Assert.Equal("The 'child' resource cannot wait for its parent 'parent'.", waitForCompletionEx.Message); 250Assert.Equal("Stopped waiting for resource 'redis' to become healthy because it failed to start.", ex.Message); 274Assert.Equal("The operation has timed out.", ex.Message); 303Assert.Equal(exceptionMessage, ex.Message); 844Assert.Equal("The 'test' resource cannot wait for itself.", waitForEx.Message);
WithEnvironmentTests.cs (1)
171Assert.Equal("Parameter resource could not be used because configuration key 'Parameters:parameter' is missing and the Parameter has no default value.", innerException.Message);
WithHttpCommandTests.cs (2)
169ex.Message 191ex.Message
WithProcessCommandTests.cs (1)
1237Assert.Contains("output line count must be greater than zero", exception.Message);
WithReferenceTests.cs (2)
309Assert.Equal("The connection string for the resource 'resource' is not available.", inner.Message); 345Assert.Equal("Connection string parameter resource could not be used because connection string 'missingresource' is missing.", inner.Message);
Aspire.Hosting.TestUtilities (6)
tests\Shared\DistributedApplicationTestingBuilderExtensions.cs (1)
134_testOutputHelper.WriteLine($"Failed to read DCP log {logFile}: {ex.Message}");
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Utils\DockerUtils.cs (1)
72$"container runtime detection failed with {exception.GetType().Name}: {exception.Message}",
Aspire.Keycloak.Authentication.Tests (4)
AspireKeycloakExtensionTests.cs (4)
33Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 52Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 114Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message); 133Assert.Equal("The MetadataAddress or Authority must use HTTPS unless disabled for development by setting RequireHttpsMetadata=false.", exception.Message);
Aspire.Managed.Tests (4)
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.Microsoft.Azure.Cosmos.Tests (5)
AspireMicrosoftAzureCosmosExtensionsTests.cs (5)
173Assert.Equal("The connection string 'cosmos-key' does not exist or is missing the container name or database name.", exception.Message); 190Assert.Equal("The connection string 'cosmos-key' does not exist or is missing the container name or database name.", exception.Message); 206Assert.Equal("A Database could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:cosmos-key'.", exception.Message); 222Assert.Equal("A Database could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:cosmos-key'.", exception.Message); 494Assert.Contains("A Container could not be configured", exception.Message);
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (6)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (4)
174Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddCosmosDbContext()' or use the corresponding 'Enrich' method.", exception.Message); 314Assert.Contains("A DbContext could not be configured with this AddCosmosDbContext overload.", exception.Message); 327Assert.Contains("A DbContext could not be configured.", exception.Message); 339Assert.Contains("A DbContext could not be configured with this AddCosmosDbContext overload.", exception.Message);
EnrichCosmosDbTests.cs (2)
32Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichCosmosDbContext.", exception.Message); 135Assert.Equal("Conflicting values for 'RequestTimeout' were found in EntityFrameworkCoreCosmosSettings and set in DbContextOptions<TestDbContext>.", exception.Message);
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (4)
AspireSqlServerEFCoreSqlClientExtensionsTests.cs (1)
276Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddSqlServerDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichSqlServerTests.cs (3)
36Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichSqlServerDbContext.", exception.Message); 109Assert.Equal("Conflicting values for 'CommandTimeout' were found in MicrosoftEntityFrameworkCoreSqlServerSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 304Assert.Equal("MicrosoftEntityFrameworkCoreSqlServerSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.MongoDB.EntityFrameworkCore.Tests (3)
AspireMongoDBEntityFrameworkCoreExtensionsTests.cs (2)
75Assert.Contains("database name is required", exception.Message); 228Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddMongoDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichMongoDbTests.cs (1)
34Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichMongoDbContext.", exception.Message);
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (4)
AspireEFPostgreSqlExtensionsTests.cs (1)
283Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddNpgsqlDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichNpgsqlTests.cs (3)
40Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichNpgsqlDbContext.", exception.Message); 115Assert.Equal("Conflicting values for 'CommandTimeout' were found in NpgsqlEntityFrameworkCorePostgreSQLSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 318Assert.Equal("NpgsqlEntityFrameworkCorePostgreSQLSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.OpenAI.Tests (5)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (2)
132Assert.StartsWith("The connection string 'openai' contains both 'Deployment' and 'Model' keys.", ex.Message); 163Assert.StartsWith("The deployment could not be determined", ex.Message);
AspireOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (2)
132Assert.StartsWith("The connection string 'openai' contains both 'Deployment' and 'Model' keys.", ex.Message); 163Assert.StartsWith("The deployment could not be determined", ex.Message);
AspireOpenAIExtensionsTests.cs (1)
141"'ConnectionStrings:openai' or specify a Key in the 'Aspire:OpenAI' configuration section.", exception.Message);
Aspire.Oracle.EntityFrameworkCore.Tests (4)
AspireOracleEFCoreDatabaseExtensionsTests.cs (1)
276Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddOracleDatabaseDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichOracleDatabaseTests.cs (3)
36Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichOracleDatabaseDbContext.", exception.Message); 109Assert.Equal("Conflicting values for 'CommandTimeout' were found in OracleEntityFrameworkCoreSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 304Assert.Equal("OracleEntityFrameworkCoreSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (4)
AspireEFMySqlExtensionsTests.cs (1)
273Assert.Equal("DbContext<TestDbContext> is already registered. Please ensure 'services.AddDbContext<TestDbContext>()' is not used when calling 'AddMySqlDbContext()' or use the corresponding 'Enrich' method.", exception.Message);
EnrichMySqlTests.cs (3)
52Assert.Equal("DbContext<TestDbContext> was not registered. Ensure you have registered the DbContext in DI before calling EnrichMySqlDbContext.", exception.Message); 125Assert.Equal("Conflicting values for 'CommandTimeout' were found in PomeloEntityFrameworkCoreMySqlSettings and set in DbContextOptions<TestDbContext>.", exception.Message); 320Assert.Equal("PomeloEntityFrameworkCoreMySqlSettings.DisableRetry needs to be set when a custom Execution Strategy is configured.", exception.Message);
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
264connectAttemptActivity.AddTag("exception.message", ex.Message);
Aspire.RabbitMQ.Client.Tests (1)
AspireRabbitMQLoggingTests.cs (1)
227Assert.Equal($"{innerException.GetType()}: {innerException.Message}", errorEvent[3].Value?.ToString());
Aspire.RabbitMQ.Client.v6.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\AspireRabbitMQLoggingTests.cs (1)
227Assert.Equal($"{innerException.GetType()}: {innerException.Message}", errorEvent[3].Value?.ToString());
Aspire.Templates.Tests (5)
tests\Shared\TemplatesTesting\AspireProject.cs (3)
378return ex.Message.Contains("net::ERR_NETWORK_CHANGED", StringComparison.OrdinalIgnoreCase) || 379ex.Message.Contains("net::ERR_SOCKET_NOT_CONNECTED", StringComparison.OrdinalIgnoreCase); 383_testOutput.WriteLine($"Reloading dashboard page due to {args.Outcome.Exception?.Message}");
tests\Shared\TemplatesTesting\BuildEnvironment.cs (1)
272Console.WriteLine($"\tFailed to delete {dir} : {ioex.Message}. Ignoring.");
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
26catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
Aspire.TerminalHost (1)
TerminalHostApp.cs (1)
261await Console.Error.WriteLineAsync($"[Aspire.TerminalHost] {ex.Message}")
Aspire.TerminalHost.Tests (13)
TerminalHostArgsTests.cs (9)
62Assert.Contains("--producer-uds", ex.Message); 73Assert.Contains("--consumer-uds", ex.Message); 84Assert.Contains("--control-uds", ex.Message); 99Assert.Contains("--producer-uds", ex.Message); 112Assert.Contains("--consumer-uds", ex.Message); 125Assert.Contains("--columns", ex.Message); 138Assert.Contains("--bogus", ex.Message); 148Assert.Contains("--producer-uds", ex.Message); 161Assert.Contains("--columns", ex.Message);
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
Aspire.TestUtilities (1)
ProcessExtensions.cs (1)
20catch (InvalidOperationException ie) when (ie.Message.Contains("No process is associated with this object"))
CatalogDb (1)
CatalogDbInitializerHealthCheck.cs (1)
14{ IsFaulted: true } => Task.FromResult(HealthCheckResult.Unhealthy(task.Exception?.InnerException?.Message, task.Exception)),
Client.ClientBase.IntegrationTests (1)
DuplexClientBaseTests.4.1.0.cs (1)
41Assert.Contains("BasicHttpBinding", exception.Message);
Client.ExpectedExceptions.IntegrationTests (13)
ExpectedExceptionTests.4.0.0.cs (2)
49Assert.True(String.Equals(exception.Message, exceptionMsg), String.Format("Expected exception message: {0}\nActual exception message: {1}", exceptionMsg, exception.Message));
ExpectedExceptionTests.4.1.0.cs (10)
51Assert.True(exception.Message.Contains(nonExistentHost), string.Format("Expected exception message to contain: '{0}'\nThe exception message was: {1}", nonExistentHost, exception.Message)); 114string exceptionMessage = ex.Message; 115string innerExceptionMessage = ex.InnerException?.Message; 184Assert.True(exception.Message.Contains(notFoundUrl), string.Format("Expected exception message to contain: '{0}'\nThe exception message was:{1}", notFoundUrl, exception.Message)); 222Assert.True(exception.Message.Contains(protocolExceptionUri), string.Format("Expected exception message to contain: '{0}'\nThe exception was: '{1}'", protocolExceptionUri, exception.Message)); 408Assert.True(exception.Message.Contains(Endpoints.Tcp_RevokedServerCertResource_HostName), 455Assert.True(exception.Message.Contains(Endpoints.Tcp_RevokedServerCertResource_HostName),
ExpectedExceptionTests.4.1.1.cs (1)
56Assert.Equal(MyCertificateValidator.exceptionMsg, exception.Message);
CodeStyleConfigFileGenerator (2)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Contract.XmlSerializer.IntegrationTests (10)
XmlSerializerFormatTest.cs (10)
95Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 117Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 149Assert.Fail(ex.Message); 197Assert.Fail(ex.Message); 245Assert.Fail(ex.Message); 293Assert.Fail(ex.Message); 349Assert.Fail(ex.Message); 406Assert.Fail(ex.Message); 463Assert.Fail(ex.Message); 501Assert.Fail(ex.Message);
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\TaskBase.cs (1)
40Log.LogError(e.Message);
csc (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
306return new RejectedBuildResponse($"Error writing build request: {e.Message}"); 331response = new RejectedBuildResponse($"Error reading response: {e.Message}");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'"); 138Debug.Assert(false, e.Message);
dotnet (72)
BuildServer\BuildServerProvider.cs (1)
95ex.Message).Yellow());
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (2)
445e.Message)); 455e2.Message));
Commands\BuildServer\Shutdown\BuildServerShutdownCommand.cs (2)
132exception.InnerException?.Message).Red()); 140exception.InnerException?.Message).Red());
Commands\Clean\FileBasedAppArtifacts\CleanFileBasedAppArtifactsCommand.cs (1)
42Reporter.Error.WriteLine(string.Format(CliCommandStrings.CleanFileBasedAppArtifactsErrorRemovingFolder, folder, ex.Message).Red());
Commands\New\MSBuildEvaluation\MSBuildEvaluator.cs (2)
93_logger?.LogDebug("Exception occurred when searching for the project file: {0}", e.Message); 176return result = MSBuildEvaluationResult.CreateFailure(projectPath, e.Message);
Commands\New\MSBuildEvaluation\ProjectCapabilityConstraint.cs (3)
38environmentSettings.Host.Logger.LogDebug("{0}: Failed to evaluate the project: {1}.", nameof(ProjectCapabilityConstraintFactory), e.Message); 39throw new Exception(string.Format(CliCommandStrings.ProjectCapabilityConstraintFactory_Exception_EvaluationFailed, Type, e.Message), e); 80_logger.LogDebug("Failed to parse configuration: '{0}', reason: {1}", args, e.Message);
Commands\New\MSBuildEvaluation\ProjectContextSymbolSource.cs (1)
69settings.Host.Logger.LogDebug("{0}: unexpected error during evaluation: {1}.", nameof(ProjectContextSymbolSource), e.Message);
Commands\New\PostActions\DotnetAddPostActionProcessor.cs (2)
179Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddReference_AddPackageReference_Failed, e.Message)); 202Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddReference_AddProjectReference_Failed, e.Message));
Commands\New\PostActions\DotnetRestorePostActionProcessor.cs (1)
65Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_Restore_RestoreFailed, e.Message));
Commands\New\PostActions\DotnetSlnPostActionProcessor.cs (1)
153Reporter.Error.WriteLine(string.Format(CliCommandStrings.PostAction_AddProjToSln_Failed, e.Message));
Commands\Run\Api\RunApiCommand.cs (1)
40Respond(new RunApiOutput.Error { Message = ex.Message, Details = ex.ToString() });
Commands\Run\EnvironmentVariablesToMSBuild.cs (1)
134Reporter.Verbose.WriteLine($"Failed to delete temporary props file '{propsFilePath}': {ex.Message}");
Commands\Run\FileBasedAppRunPlan.cs (1)
300Reporter.Verbose.WriteLine($"Failed to deserialize cache entry ({path}): {exception.GetType().FullName}: {exception.Message}");
Commands\Run\VirtualProjectBuildingCommand.cs (1)
317e.Message.Red().Bold());
Commands\Sdk\Check\ProductCollectionProvider.cs (1)
23throw new GracefulException(string.Format(CliCommandStrings.ReleasesLibraryFailed, e.Message));
Commands\Sdk\Check\SdkCheckCommand.cs (1)
75throw new GracefulException([CliCommandStrings.HostFxrCouldNotBeLoaded], [hostFxrNotFoundException.Message], isUserError: false);
Commands\Solution\List\SolutionListCommand.cs (1)
34throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message);
Commands\Solution\Migrate\SolutionMigrateCommand.cs (1)
41throw new GracefulException(ex.Message, ex);
Commands\Solution\Remove\SolutionRemoveCommand.cs (2)
61throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message); 63throw new GracefulException(ex.Message, ex);
Commands\Test\MTP\ArtifactPostProcessingManager.cs (1)
193ex.Message)) ? 1 : 0;
Commands\Tool\Common\ToolManifestFinderExtensions.cs (1)
32throw new GracefulException([e.Message, CliCommandStrings.ToolCommonNoManifestGuide], verboseMessages: [e.VerboseMessage], isUserError: false);
Commands\Tool\Install\ToolInstallCommandLowLevelErrorConverter.cs (2)
17yield return string.Format(CliCommandStrings.InvalidToolConfiguration, ex.Message); 22yield return string.Format(CliCommandStrings.FailedToCreateToolShim, packageId, ex.Message);
Commands\Tool\List\ToolListGlobalOrToolPathCommand.cs (1)
93ex.Message).Yellow());
Commands\Tool\Restore\ToolRestoreCommand.cs (1)
98_reporter.WriteLine(e.Message.Yellow());
Commands\Tool\Uninstall\ToolUninstallCommandLowLevelErrorConverter.cs (2)
18userFacingMessages = [string.Format(CliStrings.FailedToUninstallToolPackage, packageId, ex.Message)]; 22userFacingMessages = [string.Format(CliCommandStrings.FailedToUninstallTool, packageId, ex.Message)];
Commands\Workload\Install\FileBasedInstaller.cs (3)
125throw new Exception(string.Format(CliCommandStrings.FailedToInstallWorkloadSet, workloadSetVersion, ex.Message), ex); 244_reporter.WriteLine(string.Format(CliCommandStrings.WorkloadInstallRollBackFailedMessage, e.Message)); 302throw new Exception(string.Format(CliCommandStrings.FailedToInstallWorkloadManifest, manifestUpdate.ManifestId, manifestUpdate.NewVersion, e.Message), e);
Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (1)
247_reporter.WriteLine(CliCommandStrings.FailedAdManifestUpdate, manifestId, e.Message);
Commands\Workload\Install\WorkloadInstallCommand.cs (4)
163throw new GracefulException(string.Format(CliCommandStrings.WorkloadInstallWorkloadCacheDownloadFailed, e.Message), e, isUserError: false); 212throw new GracefulException(string.Format(CliCommandStrings.WorkloadInstallationFailed, e.Message), e, isUserError: false); 320verbosity.IsDetailedOrDiagnostic() ? e.ToString() : e.Message).Yellow()); 351RollbackFailed = ex => Reporter.WriteLine(string.Format(CliCommandStrings.WorkloadInstallRollBackFailedMessage, ex.Message))
Commands\Workload\Repair\WorkloadRepairCommand.cs (1)
96throw new GracefulException(string.Format(CliCommandStrings.WorkloadRepairFailed, e.Message), e, isUserError: false);
Commands\Workload\Uninstall\WorkloadUninstallCommand.cs (1)
88throw new GracefulException(string.Format(CliCommandStrings.WorkloadUninstallFailed, e.Message), e, isUserError: false);
Commands\Workload\Update\WorkloadUpdateCommand.cs (3)
88throw new GracefulException(string.Format(CliCommandStrings.WorkloadUpdateWorkloadCacheDownloadFailed, e.Message), e, isUserError: false); 139throw new GracefulException(string.Format(CliCommandStrings.WorkloadUpdateFailed, e.Message), e, isUserError: false); 248Reporter.WriteLine(string.Format(CliCommandStrings.WorkloadUpdateRollBackFailedMessage, ex.Message));
NugetPackageDownloader\NuGetPackageDownloader.cs (1)
942throw new NuGetPackageInstallerException($"{string.Format(CliStrings.FailedToLoadNuGetSource, source.Source)}: {e.Message}", e);
Parser.cs (4)
374exception.Message.Red().Bold()); 380exception.Message.Red().Bold()); 387exception.Message.Red().Bold()); 394exception.Message.Red().Bold());
Program.cs (2)
108: e.Message.Red().Bold()); 152Reporter.Error.WriteLine(e.Message.Red());
ReleasePropertyProjectLocator.cs (1)
261Reporter.Error.WriteLine(e.Message);
ShellShim\ShellShimRepository.cs (3)
94string.Format(CliStrings.FailedSettingShimPermissions, ex.Message)); 102ex.Message 137ex.Message
SlnFileFactory.cs (2)
82solutionPath, ex.Message); 113filteredSolutionPath, ex.Message);
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\BuildServerConnection.cs (2)
306return new RejectedBuildResponse($"Error writing build request: {e.Message}"); 331response = new RejectedBuildResponse($"Error reading response: {e.Message}");
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26425.101\contentFiles\cs\net11.0\CompilerServerLogger.cs (2)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'"); 138Debug.Assert(false, e.Message);
Telemetry\ExternalTelemetryProperties.cs (1)
68Debug.Assert(false, $"Unexpected exception from GetProductInfo: ${e.GetType().Name}: ${e.Message}");
ToolManifest\ToolManifestEditor.cs (1)
219possibleManifest.Value, e.Message));
ToolPackage\ToolConfigurationDeserializer.cs (1)
70ex.Message),
ToolPackage\ToolPackageInstance.cs (2)
78throw new ToolPackageException(string.Format(CliStrings.FailedToReadNuGetLockFile, Id, ex.Message), ex); 239ex.Message),
ToolPackage\ToolPackageUninstaller.cs (1)
43throw new ToolPackageException(ex.Message, ex);
TransactionalAction.cs (2)
88Reporter.Verbose.WriteLine(string.Format("TransactionAbortedException Message: {0}", ex.Message)); 90$"Inner Exception Message: {ex?.InnerException?.Message + "---" + ex?.InnerException}");
dotnet-aot (20)
src\sdk\src\Cli\dotnet\Commands\Run\FileBasedAppRunPlan.cs (1)
300Reporter.Verbose.WriteLine($"Failed to deserialize cache entry ({path}): {exception.GetType().FullName}: {exception.Message}");
src\sdk\src\Cli\dotnet\Commands\Sdk\Check\ProductCollectionProvider.cs (1)
23throw new GracefulException(string.Format(CliCommandStrings.ReleasesLibraryFailed, e.Message));
src\sdk\src\Cli\dotnet\Commands\Sdk\Check\SdkCheckCommand.cs (1)
75throw new GracefulException([CliCommandStrings.HostFxrCouldNotBeLoaded], [hostFxrNotFoundException.Message], isUserError: false);
src\sdk\src\Cli\dotnet\Commands\Solution\List\SolutionListCommand.cs (1)
34throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message);
src\sdk\src\Cli\dotnet\Commands\Solution\Migrate\SolutionMigrateCommand.cs (1)
41throw new GracefulException(ex.Message, ex);
src\sdk\src\Cli\dotnet\Commands\Solution\Remove\SolutionRemoveCommand.cs (2)
61throw new GracefulException(CliStrings.InvalidSolutionFormatString, solutionFileFullPath, ex.Message); 63throw new GracefulException(ex.Message, ex);
src\sdk\src\Cli\dotnet\Commands\Tool\Common\ToolManifestFinderExtensions.cs (1)
32throw new GracefulException([e.Message, CliCommandStrings.ToolCommonNoManifestGuide], verboseMessages: [e.VerboseMessage], isUserError: false);
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (1)
247_reporter.WriteLine(CliCommandStrings.FailedAdManifestUpdate, manifestId, e.Message);
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (1)
942throw new NuGetPackageInstallerException($"{string.Format(CliStrings.FailedToLoadNuGetSource, source.Source)}: {e.Message}", e);
src\sdk\src\Cli\dotnet\NugetSearch\NugetToolSearchApiRequest.cs (2)
111serviceIndexUrl, e.Message, "N/A")); 163serviceIndexUrl, $"{searchQueryServiceType} returned a malformed URL: {e.Message}", response.StatusCode));
src\sdk\src\Cli\dotnet\Parser.cs (4)
374exception.Message.Red().Bold()); 380exception.Message.Red().Bold()); 387exception.Message.Red().Bold()); 394exception.Message.Red().Bold());
src\sdk\src\Cli\dotnet\SlnFileFactory.cs (2)
82solutionPath, ex.Message); 113filteredSolutionPath, ex.Message);
src\sdk\src\Cli\dotnet\Telemetry\ExternalTelemetryProperties.cs (1)
68Debug.Assert(false, $"Unexpected exception from GetProductInfo: ${e.GetType().Name}: ${e.Message}");
src\sdk\src\Cli\dotnet\ToolManifest\ToolManifestEditor.cs (1)
219possibleManifest.Value, e.Message));
dotnet-dev-certs (15)
Program.cs (1)
297reporter.Error(e.Message);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (3)
146Log.MacOSAddCertificateToUserProfileDirError(candidate.Thumbprint, ex.Message); 323Log.MacOSAddCertificateToUserProfileDirError(certificate.Thumbprint, ex.Message); 464Log.MacOSRemoveCertificateFromUserProfileDirError(certificate.Thumbprint, ex.Message);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (11)
229Log.UnixDotnetTrustException(ex.Message); 434Log.WslWindowsTrustException(ex.Message); 459Log.UnixDotnetUntrustException(ex.Message); 722Log.UnixNssDbCheckException(nssDb.Path, ex.Message); 750Log.UnixNssDbAdditionException(nssDb.Path, ex.Message); 779Log.UnixNssDbRemovalException(nssDb.Path, ex.Message); 799Log.UnixFirefoxProfileEnumerationException(firefoxDirectory, ex.Message); 825Log.UnixCertificateFileDeletionException(certPath, ex.Message); 959Log.UnixOpenSslVersionException(ex.Message); 994Log.UnixOpenSslHashException(certificatePath, ex.Message); 1069Log.UnixOpenSslRehashException(ex.Message);
dotnet-format (2)
Analyzers\SolutionCodeFixApplier.cs (1)
89logger.LogWarning(Resources.Failed_to_apply_code_fix_0_for_1_2, codeFix.GetType().Name, diagnosticId, ex.Message);
Workspaces\FolderWorkspace.cs (1)
71OnWorkspaceFailed(new DocumentDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, id));
dotnet-getdocument (1)
src\aspnetcore\src\Tools\GetDocumentInsider\src\ProgramBase.cs (1)
58_reporter.WriteError(ex.Message);
dotnet-Microsoft.XmlSerializer.Generator (2)
Sgen.cs (2)
527Console.Error.WriteLine(FormatMessage(parsableerrors, false, e.Message)); 536Console.Out.WriteLine(FormatMessage(parsableerrors, true, e.Message));
dotnet-openapi (2)
Application.cs (2)
65Error.WriteLine(ex.InnerException.Message); 81Error.WriteLine(ex.Message);
dotnet-sourcelink (2)
dotnet-sql-cache (4)
Program.cs (4)
145CreateReporter(verbose: false).Error($"An error occurred. {exception.Message}"); 193$"An error occurred while trying to script the table and index. {ex.Message}"); 249$"An error occurred while trying to create the table and index. {ex.Message}"); 269$"Invalid SQL Server connection string '{_connectionString}'. {ex.Message}", ex);
dotnet-svcutil-lib (122)
AppInsightsTelemetryClient.cs (1)
127ToolConsole.WriteWarning(ex.Message);
Bootstrapper\SvcutilBootstrapper.cs (1)
207throw new BootstrapException(string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", exception.Message, Environment.NewLine, Resource.BootstrapErrorDisableReferences));
CommandProcessorOptions.cs (1)
1021throw new ToolArgumentException(ex.Message);
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (1)
980throw new XmlException(e.Message, e);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (2)
2790Throw(new XmlException(e.Message, (Exception)null, lineNo, linePos, _ps.baseUriStr)); 8072innerMessage = e.Message;
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (2)
553throw new XmlSchemaException(ResXml.Sch_InvalidValueDetailed, new string[] { s, GetTypeName(), exception.Message }, exception, null, 0, 0, null); 571throw new XmlSchemaException(ResXml.Sch_InvalidValueDetailed, new string[] { s, GetTypeName(), exception.Message }, exception, null, 0, 0, null);
FrameworkFork\Microsoft.Xml\Xml\schema\FacetChecker.cs (2)
370throw new XmlSchemaException(ResXml.Sch_PatternFacetInvalid, new string[] { e.Message }, e, _pattern_facet.SourceUri, _pattern_facet.LineNumber, _pattern_facet.LinePosition, _pattern_facet); 676throw new XmlSchemaException(code, new string[] { ex.Message }, ex, facet.SourceUri, facet.LineNumber, facet.LinePosition, facet);
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (4)
571SendValidationEvent(ResXml.Sch_AttributeValueDataTypeDetailed, new string[] { "version", schema.Version, tokenDt.TypeCodeString, exception.Message }, exception, schema); 2028SendValidationEvent(ResXml.Sch_InvalidAnyDetailed, new string[] { fe.Message }, fe, particle); 2071SendValidationEvent(ResXml.Sch_InvalidAnyDetailed, new string[] { fe.Message }, fe, anyAttribute); 2145SendValidationEvent(ResXml.Sch_InvalidAttribute, new string[] { attributeName, fx.Message }, fx, xso);
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionPreprocessor.cs (2)
1742SendValidationEvent(ResXml.Sch_InvalidIdAttribute, ex.Message, xso); 1782SendValidationEvent(ResXml.Sch_InvalidAttribute, attributeName, ex.Message, xso);
FrameworkFork\Microsoft.Xml\Xml\schema\xdrvalidator.cs (1)
358SendValidationEvent(ResXml.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaException.cs (1)
189return (_message == null) ? base.Message : _message;
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (6)
1307SendValidationEvent(ResXml.Sch_InvalidValueDetailedAttribute, new string[] { "schemaLocation", xsiSchemaLocation, s_dtStringArray.TypeCodeString, exception.Message }, exception); 1505SendValidationEvent(ResXml.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName, _context.Namespace), stringValue, GetTypeName(decl), exception.Message }, exception); 1667SendValidationEvent(ResXml.Sch_InvalidValueDetailedAttribute, new string[] { "type", xsiType, s_dtQName.TypeCodeString, exception.Message }, exception); 1882SendValidationEvent(ResXml.Sch_CannotLoadSchema, new string[] { uri, e.Message }, e, XmlSeverityType.Warning); 1986SendValidationEvent(ResXml.Sch_AttributeValueDataTypeDetailed, new string[] { attdef.Name.ToString(), stringValue, GetTypeName(decl), exception.Message }, exception); 2001SendValidationEvent(ResXml.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName, _context.Namespace), stringValue, GetTypeName(decl), exception.Message }, exception);
FrameworkFork\Microsoft.Xml\Xml\schema\xsdvalidator.cs (1)
620SendValidationEvent(ResXml.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
FrameworkFork\Microsoft.Xml\Xml\XmlException.cs (1)
253return (_message == null) ? base.Message : _message;
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathException.cs (1)
87return (_message == null) ? base.Message : _message;
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (5)
669throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex); 1038throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex); 1062throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex); 1079throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex); 1102throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DictionaryGlobals.cs (1)
137throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(ex.Message, ex);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (2)
827ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, string.Format(SRSerialization.IsValueTypeFormattedIncorrectly, isValueTypeInnerText, fe.Message)); 1163ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, string.Format(SRSerialization.IsDictionaryFormattedIncorrectly, isDictionaryInnerText, fe.Message));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializer.cs (1)
384string innerExceptionMessage = (innerException == null) ? string.Empty : innerException.Message;
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (1)
474throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(exception.Message, exception.InnerException));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (1)
1469throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(exception.Message, exception.InnerException));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AssertHelper.cs (1)
56newMessage = string.Concat(newMessage, " [", exception.GetType().Name, ": ", exception.Message, "] --> ", message);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\DiagnosticTraceBase.cs (1)
167xml.WriteElementString(DiagnosticStrings.MessageTag, XmlEncode(exception.Message));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (1)
282new Tuple<string, string> (DiagnosticStrings.MessageTag, XmlEncode(exception.Message)),
FrameworkFork\System.ServiceModel\System\ServiceModel\ActionNotSupportedException.cs (1)
20string reason = this.Message;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (3)
101new WebSocketException(WebSocketError.ConnectionClosedPrematurely).Message); 128WcfEventSource.Instance.WebSocketConnectionFailed(EventTraceActivity, ex.Message); 166throw FxTrace.Exception.AsError(new CommunicationException(ex.Message, ex));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Connection.cs (3)
520return new TimeoutException(ioException.InnerException.Message, ioException); 524return new CommunicationObjectAbortedException(ioException.InnerException.Message, ioException); 528return new CommunicationException(ioException.InnerException.Message, ioException);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPool.cs (1)
185WcfEventSource.Instance.CloseTimeout(exception.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (3)
284return new CommunicationException(inner.Message, inner); 297return new CommunicationException(inner.Message, inner); 302return new CommunicationException(inner.Message, inner);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (2)
122throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new CommunicationException(requestException.Message, requestException)); 143return new CommunicationException(exception.Message, exception);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (2)
1252new CommunicationException(versionMismatchException.Message, versionMismatchException), 1454new CommunicationException(versionMismatchException.Message, versionMismatchException),
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
113new ProtocolException(string.Format(SRServiceModel.HttpContentTypeFormatException, formatException.Message, Headers.ContentType.ToString()), formatException));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeader.cs (1)
271throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(exception.Message, (Exception)null));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestContextBase.cs (1)
322WcfEventSource.Instance.CloseTimeout(e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
858WcfEventSource.Instance.CloseTimeout(e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SessionConnectionReader.cs (2)
254WcfEventSource.Instance.ReceiveTimeout(e.Message); 273WcfEventSource.Instance.ReceiveTimeout(e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (5)
360throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityNegotiationException(exception.Message, 366string.Format(SRServiceModel.NegotiationFailedIO, ioException.Message), ioException)); 605throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityNegotiationException(tokenValidationException.Message, 610throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityNegotiationException(exception.Message, 616string.Format(SRServiceModel.NegotiationFailedIO, ioException.Message), ioException));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElementImporter.cs (1)
180string.Format(SRServiceModel.UnsupportedBooleanAttribute, TransactionPolicyStrings.OptionalLocal, e.Message)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (2)
182WcfEventSource.Instance.ReceiveTimeout(e.Message); 202WcfEventSource.Instance.ReceiveTimeout(e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketHelper.cs (3)
140CommunicationObjectAbortedException communicationObjectAbortedException = new CommunicationObjectAbortedException(ex.Message, ex); 183return new CommunicationObjectAbortedException(exception.Message, exception); 186return new CommunicationException(exception.Message, exception);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
667WcfEventSource.Instance.ReceiveTimeout(exception.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExporter.cs (1)
146string errorMessage = string.Format(SRServiceModel.PolicyExtensionExportError, exporter.GetType(), e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataImporter.cs (1)
141string errorMessage = string.Format(SRServiceModel.PolicyExtensionImportError, importer.GetType(), e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (1)
221method.Comments.Add(new CodeCommentStatement(string.Format(SRServiceModel.SFxCodeGenWarning, ex.Message)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (3)
1896string errorMessage = string.Format(SRServiceModel.WsdlExtensionBeforeImportError, importer.GetType().AssemblyQualifiedName, e.Message); 1909string errorMessage = string.Format(SRServiceModel.WsdlExtensionImportError, importer.GetType().FullName, e.Message); 1972return messageException.Message;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (3)
240string.Format(SRServiceModel.SFxInvalidMessageBodyErrorSerializingParameter, part.Description.Namespace, part.Description.Name, sx.Message), sx)); 436part.Description.Namespace, part.Description.Name, e.Message), 444part.Description.Namespace, part.Description.Name, e.Message),
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
90fault = MessageFault.CreateFault(code, new FaultReason(error.Message), new ExceptionDetail(error)); 123WcfEventSource.Instance.FaultProviderInvoked(_handlers[i].GetType().FullName, e.Message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (2)
515throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(e.Message, e); 615throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(e.Message, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\MessageRpc.cs (1)
487throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(e.Message, e);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
149string.Format(SRServiceModel.SFxErrorDeserializingReplyBodyMore, _operationName, fe.Message), fe)); 154string.Format(SRServiceModel.SFxErrorDeserializingReplyBodyMore, _operationName, se.Message), se)); 214string.Format(SRServiceModel.SFxErrorDeserializingRequestBodyMore, _operationName, fe.Message), 220string.Format(SRServiceModel.SFxErrorDeserializingRequestBodyMore, _operationName, se.Message),
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (4)
400string.Format(SRServiceModel.SFxErrorDeserializingReplyBodyMore, _operation.Name, fe.Message), fe)); 405string.Format(SRServiceModel.SFxErrorDeserializingReplyBodyMore, _operation.Name, se.Message), se)); 442string.Format(SRServiceModel.SFxErrorDeserializingRequestBodyMore, _operation.Name, fe.Message), 448string.Format(SRServiceModel.SFxErrorDeserializingRequestBodyMore, _operation.Name, se.Message),
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (2)
127string.Format(SRServiceModel.SFxErrorSerializingHeader, messageDescription.MessageName, e.Message), e)); 301string.Format(SRServiceModel.SFxErrorSerializingBody, messageDescription.MessageName, e.Message), e));
FrameworkFork\System.ServiceModel\System\ServiceModel\ExceptionDetail.cs (1)
28_message = exception.Message;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy.cs (1)
1946importer.Errors.Add(new MetadataConversionError(string.Format(SRServiceModel.UnsupportedBooleanAttribute, OptionalName, e.Message), false));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityPolicy11.cs (1)
96importer.Errors.Add(new MetadataConversionError(string.Format(SRServiceModel.UnsupportedBooleanAttribute, RequireClientCertificateName, e.Message), false));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (8)
271throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 283throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 295throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 307throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 319throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 331throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 343throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 355throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message));
FrameworkFork\System.ServiceModel\System\ServiceModel\WSAddressing10ProblemHeaderQNameFault.cs (2)
38_reason = new FaultReason(e.Message, CultureInfo.CurrentCulture); 48_reason = new FaultReason(e.Message, CultureInfo.CurrentCulture);
Shared\MSBuildProj.cs (2)
856await safeLogger.WriteWarningAsync(ex.Message, logToUI: false).ConfigureAwait(false); 937await safeLogger.WriteWarningAsync(ex.Message, logToUI: false).ConfigureAwait(false);
Shared\ProjectPropertyResolver.cs (2)
70await safeLogger.WriteMessageAsync(ex.Message, logToUI: false).ConfigureAwait(false); 98await safeLogger.WriteErrorAsync($"{ex.Message}{Environment.NewLine}{ex.StackTrace}", logToUI: false);
Shared\Utilities\PathHelper.cs (2)
221await safeLogger.WriteErrorAsync(ex.Message, logToUI: false).ConfigureAwait(false); 269await safeLogger.WriteMessageAsync($"Error: {ex.Message}", logToUI: false).ConfigureAwait(false);
Shared\Utilities\RuntimeEnvironmentHelper.cs (1)
118await safeLogger.WriteErrorAsync(ex.Message, logToUI: false);
Shared\Utilities\Utilities.cs (1)
40var exMsg = e.Message?.Trim();
Tool.cs (1)
324var ex = new AggregateException(options.Errors.Select(e => e as ToolArgumentException ?? new ToolArgumentException(e.Message, e.InnerException)));
TypeLoader.cs (2)
33ToolConsole.WriteWarning(string.Format(SR.ErrUnableToLoadReferenceFormat, path, ex.Message)); 61warning = ex.Message;
dotnet-svcutil-lib.Tests (2)
UnitTest.cs (2)
253Environment.NewLine + cmdOptions.Errors.Select(e => e.Message).Aggregate((errors, e) => $"{errors}{Environment.NewLine}{e}"); 299Environment.NewLine + cmdOptions.Errors.Select(e => e.Message).Aggregate((errors, e) => $"{errors}{Environment.NewLine}{e}");
dotnet-svcutil.xmlserializer (8)
Microsoft\Tools\ServiceModel\SvcUtil\ExportModule.cs (1)
78_contractLoadErrorCallback(type, e.Message);
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (1)
243ToolConsole.WriteLine(" " + e.Message, 2);
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
451ToolConsole.WriteError(string.Format("Fail to load the assembly {0} with the error {1}", smassembly, e.Message)); 465ToolConsole.WriteError(string.Format("Fail to load the assembly {0} with the error {1}", smpassembly, e.Message));
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (4)
106WriteError(e.Message, prefix); 110if (e.Message != e.InnerException.Message) 112WriteError(e.InnerException.Message, " ");
dotnet-svcutil.xmlserializer.IntegrationTests (10)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (10)
95Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 117Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 149Assert.Fail(ex.Message); 197Assert.Fail(ex.Message); 245Assert.Fail(ex.Message); 293Assert.Fail(ex.Message); 349Assert.Fail(ex.Message); 406Assert.Fail(ex.Message); 463Assert.Fail(ex.Message); 501Assert.Fail(ex.Message);
dotnet-user-jwts (3)
Program.cs (2)
59_reporter.Error(parsingException.Message); 64_reporter.Error(ex.Message);
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
42_reporter.Error(ex.Message);
dotnet-user-secrets (3)
Program.cs (2)
44reporter.Error(Resources.FormatError_Command_Failed(exception.Message)); 59CreateReporter(verbose: false).Error(ex.Message);
src\aspnetcore\src\Tools\Shared\SecretsHelpers\ProjectIdResolver.cs (1)
42_reporter.Error(ex.Message);
dotnet-watch (4)
CommandLine\CommandLineOptions.cs (1)
190logger.LogError(e.Message);
Program.cs (3)
125logger.LogError(Resources.The_specified_path_0_is_invalid_1, options.FilePath, e.Message); 194logger.LogError(Resources.The_specified_path_0_is_invalid_1, projectPath, e.Message); 208logger.LogError(Resources.The_specified_path_0_is_invalid_1, projectPath, e.Message);
EventHubsConsumer (1)
Processor.cs (1)
40logger.LogError(args.Exception, "Error processing message: {Error}", args.Exception.Message);
GenerateDocumentationAndConfigFiles (16)
CodeFixerExtensions.cs (2)
57Console.WriteLine($"Error creating instance of {typeInfo.FullName} in {analyzerFileReference.FullPath}\r\n{ex.Message}\r\n{ex}"); 64Console.WriteLine($"Error processing analyzer file reference: {analyzerFileReference.FullPath}\r\n{ex.Message}\r\n{ex}");
Program.cs (2)
889await Console.Error.WriteLineAsync(ex.Message.AsMemory(), cancellationToken).ConfigureAwait(false); 954await Console.Error.WriteLineAsync(ex.Message.AsMemory(), cancellationToken).ConfigureAwait(false);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
GetDocument.Insider (1)
ProgramBase.cs (1)
58_reporter.WriteError(ex.Message);
ilasm (2)
IlasmRootCommand.cs (1)
178Console.Error.WriteLine("Error: " + e.Message);
Program.cs (1)
276Console.Error.WriteLine($"Error: {ex.Message}");
ILAssembler (1)
GrammarVisitor.cs (1)
701_diagnostics.Add(new Diagnostic(DiagnosticIds.KeyFileError, DiagnosticSeverity.Error, $"Failed to read key file '{keyFilePath}': {ex.Message}", location));
ILCompiler.Compiler (4)
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\PInvokeILEmitter.cs (2)
453Debug.Assert(!string.IsNullOrEmpty(ex.Message)); 454return MarshalHelpers.EmitExceptionBody(ex.Message, method);
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\StructMarshallingThunk.cs (2)
320Debug.Assert(!string.IsNullOrEmpty(ex.Message)); 321return MarshalHelpers.EmitExceptionBody(ex.Message, this);
ILCompiler.ReadyToRun (2)
Compiler\ReadyToRunCodegenCompilation.cs (2)
1002Logger.Writer.WriteLine($"Info: Method `{method}` was not compiled because `{ex.Message}` requires runtime JIT"); 1007Logger.Writer.WriteLine($"Warning: Method `{method}` was not compiled because `{ex.Message}` requires runtime JIT");
illink (2)
Infrastructure.Common (2)
xunit\ConditionAttribute.cs (1)
92exc.Message));
xunit\WcfTestCase.cs (1)
86e.Message, DisplayName, item.Message, item.Payload.Count));
Infrastructure.IntegrationTests (1)
OSAndFrameworkTests.4.1.1.cs (1)
84Assert.Fail($"Creating endpoint address with serviceUri {serviceUri} threw exeception \"{e.Message}\"");
Infrastructure.Tests (6)
tests\Shared\TemporaryWorkspace.cs (4)
71outputHelper.WriteLine($"Failed to delete temporary workspace '{workspaceDirectory.FullName}': {ex.Message}"); 132throw new IOException($"Cannot delete '{file.FullName}': {ex.Message}", ex); 143throw new IOException($"Cannot delete directory '{directory.FullName}': {ex.Message}", ex); 205Console.WriteLine($"Error deleting preserved temporary workspace '{workspacePath}': {ex.Message}");
TestTriggerMap\SelectTestsCliTests.cs (2)
437Assert.Contains("Layer 1", ex.Message, StringComparison.Ordinal); 581Assert.Contains("--changed-files", ex.Message, StringComparison.Ordinal);
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
ProcessExtensions.cs (1)
17catch (InvalidOperationException ex) when (ex.Message.Contains("No process is associated with this object"))
Microsoft.Analyzers.Local.Tests (2)
JsonParseExceptionTest.cs (1)
18Assert.False(string.IsNullOrEmpty(ex.Message));
JsonScannerTest.cs (1)
35Assert.Contains("'1'", ex.Message);
Microsoft.AspNetCore.Authentication (2)
AuthenticationHandler.cs (1)
239Logger.AuthenticationSchemeNotAuthenticatedWithFailure(Scheme.Name, result.Failure.Message);
RemoteAuthenticationHandler.cs (1)
121Logger.RemoteAuthenticationError(exception.Message);
Microsoft.AspNetCore.Components (1)
Reflection\ComponentProperties.cs (1)
192$"type '{target.GetType().FullName}'. The error was: {ex.Message}", ex);
Microsoft.AspNetCore.Components.Endpoints (2)
DependencyInjection\PrerenderingErrorBoundaryLogger.cs (1)
25_exceptionCaughtByErrorBoundary(_logger, exception.Message, exception);
FormMapping\FormDataReader.cs (1)
96var errorMessage = FormattableStringFactory.Create(exception.Message);
Microsoft.AspNetCore.Components.Server (8)
Circuits\CircuitHost.cs (1)
1084exception.Message,
Circuits\CircuitRegistry.cs (2)
441=> UnhandledExceptionDisposingCircuitHost(logger, exception.Message, exception); 447=> ExceptionDisposingTokenSource(logger, exception.Message, exception);
Circuits\RemoteErrorBoundaryLogger.cs (1)
27Log.ExceptionCaughtByErrorBoundary(_logger, exception.Message, exception);
Circuits\RemoteRenderer.cs (2)
391=> UnhandledExceptionRenderingComponent(logger, exception.Message, exception); 403=> SendBatchDataFailed(logger, exception.Message, exception);
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
197error = $"Error trying to deserialize result to {itemType.Name}. {ex.Message}";
src\aspnetcore\src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\MessagePackReader.cs (1)
976private static EndOfStreamException ThrowNotEnoughBytesException(Exception innerException) => throw new EndOfStreamException(new EndOfStreamException().Message, innerException);
Microsoft.AspNetCore.Components.WebAssembly (3)
Rendering\WebAssemblyRenderer.cs (2)
235Log.UnhandledExceptionRenderingComponent(_logger, innerException.Message, innerException); 240Log.UnhandledExceptionRenderingComponent(_logger, exception.Message, exception);
src\aspnetcore\src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
Microsoft.AspNetCore.Components.WebView (2)
IpcSender.cs (1)
88var message = IpcCommon.Serialize(IpcCommon.OutgoingMessageType.NotifyUnhandledException, exception.Message, exception.StackTrace);
src\aspnetcore\src\Components\Shared\src\TransmitDataStreamToJS.cs (1)
35await runtime.InvokeVoidAsync(methodIdentifier, streamId, Array.Empty<byte>(), 0, ex.Message);
Microsoft.AspNetCore.DeveloperCertificates.XPlat (14)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (3)
146Log.MacOSAddCertificateToUserProfileDirError(candidate.Thumbprint, ex.Message); 323Log.MacOSAddCertificateToUserProfileDirError(certificate.Thumbprint, ex.Message); 464Log.MacOSRemoveCertificateFromUserProfileDirError(certificate.Thumbprint, ex.Message);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (11)
229Log.UnixDotnetTrustException(ex.Message); 434Log.WslWindowsTrustException(ex.Message); 459Log.UnixDotnetUntrustException(ex.Message); 722Log.UnixNssDbCheckException(nssDb.Path, ex.Message); 750Log.UnixNssDbAdditionException(nssDb.Path, ex.Message); 779Log.UnixNssDbRemovalException(nssDb.Path, ex.Message); 799Log.UnixFirefoxProfileEnumerationException(firefoxDirectory, ex.Message); 825Log.UnixCertificateFileDeletionException(certPath, ex.Message); 959Log.UnixOpenSslVersionException(ex.Message); 994Log.UnixOpenSslHashException(certificatePath, ex.Message); 1069Log.UnixOpenSslRehashException(ex.Message);
Microsoft.AspNetCore.Diagnostics (4)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
254Detail = errorContext.Exception.Message,
DeveloperExceptionPage\Views\ErrorPage.Designer.cs (3)
360Output.Write(HtmlEncodeAndReplaceLineBreaks(errorDetail.Error.Message)); 477Write(ex!.Message); 575Write(errorDetail.Error.Message);
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
Views\DatabaseErrorPage.Designer.cs (1)
168Write(ex.Message);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (6)
Logging\AcceptanceTests.cs (3)
656Assert.Equal("Test exception", ex.Message); 697Assert.Equal("Test exception", originalException!.Message); 731Assert.Equal("Test exception", originalException!.Message);
Logging\HttpLoggingServiceExtensionsTests.cs (2)
114Assert.Contains("HttpLogging:RequestHeadersDataClasses:User-Agent", exception.Message); 133Assert.Contains("HttpLogging:RequestPathLoggingMode", exception.Message);
Logging\LoggingOptionsValidationTests.cs (1)
31Assert.Equal($"Unsupported value '{mode}' for enum type 'IncomingPathLoggingMode'", ex.Message);
Microsoft.AspNetCore.Grpc.JsonTranscoding (3)
Internal\CommonGrpcProtocolHelpers.cs (2)
14return ex.InnerException == null ? $"{ex.GetType().Name}: {ex.Message}" : BuildErrorMessage(ex); 35sb.Append(current.Message);
Internal\JsonRequestHelpers.cs (1)
314throw new RpcException(new Status(StatusCode.InvalidArgument, ex.Message, ex));
Microsoft.AspNetCore.Hosting (4)
Internal\HostingLoggerExtensions.cs (1)
35message = message + Environment.NewLine + ex.Message;
src\aspnetcore\src\Shared\ErrorPage\ErrorPage.Designer.cs (3)
307Output.Write(HtmlEncodeAndReplaceLineBreaks(errorDetail.Error!.Message)); 417Write(ex.Message); 475Write(errorDetail.Error!.Message);
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
431transportExceptions.Add(new TransportFailedException(transportType.ToString(), ex.Message, ex));
Microsoft.AspNetCore.Http.Extensions (1)
src\aspnetcore\src\Components\Endpoints\src\FormMapping\FormDataReader.cs (1)
96var errorMessage = FormattableStringFactory.Create(exception.Message);
Microsoft.AspNetCore.Identity (5)
PasskeyExceptionExtensions.cs (1)
76=> new($"An exception occurred while parsing the attestation object: {ex.Message}", ex);
PasskeyHandler.cs (2)
180return PasskeyAttestationResult.Fail(new PasskeyException($"An unexpected error occurred during passkey attestation: {ex.Message}", ex)); 204return PasskeyAssertionResult.Fail<TUser>(new PasskeyException($"An unexpected error occurred during passkey assertion: {ex.Message}", ex));
SignInManager.cs (2)
586Logger.LogDebug(EventIds.PasskeyAttestationFailed, "Passkey attestation failed: {message}", result.Failure.Message); 630Logger.LogDebug(EventIds.PasskeyAssertionFailed, "Passkey assertion failed: {message}", result.Failure.Message);
Microsoft.AspNetCore.InternalTesting (2)
ExceptionAssertions.cs (2)
260Assert.Equal(expectedMessage, exception.Message); 264Assert.Contains(expectedMessage, exception.Message);
Microsoft.AspNetCore.JsonPatch (2)
JsonPatchDocument.cs (1)
175errorReporter(new JsonPatchError(objectToApplyTo, op, jsonPatchException.Message));
JsonPatchDocumentOfT.cs (1)
611errorReporter(new JsonPatchError(objectToApplyTo, op, jsonPatchException.Message));
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
JsonPatchDocument.cs (1)
178errorReporter(new JsonPatchError(objectToApplyTo, op, jsonPatchException.Message));
JsonPatchDocumentOfT.cs (1)
614errorReporter(new JsonPatchError(objectToApplyTo, op, jsonPatchException.Message));
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\ModelStateDictionary.cs (4)
213&& !string.IsNullOrEmpty(exception.Message)) 216return TryAddModelError(key, exception.Message); 306&& !string.IsNullOrEmpty(exception.Message)) 309return TryAddModelError(key, exception.Message);
Microsoft.AspNetCore.Mvc.Core (10)
ApplicationModels\ApplicationModelFactory.cs (1)
167ex.Message);
Formatters\SystemTextJsonInputFormatter.cs (1)
152=> JsonInputException(logger, exception.Message);
ModelBinding\Binders\DictionaryModelBinder.cs (1)
174bindingContext.ModelState.AddModelError(bindingContext.ModelName, ex.Message);
ModelBinding\FormFileValueProviderFactory.cs (2)
43throw new ValueProviderException(Resources.FormatFailedToReadRequestForm(ex.Message), ex); 49throw new ValueProviderException(Resources.FormatFailedToReadRequestForm(ex.Message), ex);
ModelBinding\FormValueProviderFactory.cs (2)
45throw new ValueProviderException(Resources.FormatFailedToReadRequestForm(ex.Message), ex); 51throw new ValueProviderException(Resources.FormatFailedToReadRequestForm(ex.Message), ex);
ModelBinding\JQueryFormValueProviderFactory.cs (2)
45throw new ValueProviderException(Resources.FormatFailedToReadRequestForm(ex.Message), ex); 51throw new ValueProviderException(Resources.FormatFailedToReadRequestForm(ex.Message), ex);
Routing\AttributeRoute.cs (1)
203routeInfo.ErrorMessage = ex.Message;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
431return new InputFormatterException(exception.Message, exception);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Filters\AntiforgeryMiddlewareAuthorizationFilter.cs (1)
26Log.AntiforgeryTokenInvalid(_logger, antiforgeryValidationFeature.Error!.Message, antiforgeryValidationFeature.Error!);
Filters\ValidateAntiforgeryTokenAuthorizationFilter.cs (1)
41Log.AntiforgeryTokenInvalid(_logger, exception.Message, exception);
Microsoft.AspNetCore.Routing (1)
Template\TemplateParser.cs (1)
30throw new ArgumentException(ex.Message, nameof(routeTemplate), ex);
Microsoft.AspNetCore.Server.HttpSys (2)
ValidationHelper.cs (2)
18return exception.Message; 20return exception.Message + " (" + ExceptionMessage(exception.InnerException) + ")";
Microsoft.AspNetCore.Server.IIS (4)
Core\IISHttpContext.Log.cs (1)
23=> ConnectionBadRequest(logger, connectionId, ex.Message, ex);
src\aspnetcore\src\Shared\ErrorPage\ErrorPage.Designer.cs (3)
307Output.Write(HtmlEncodeAndReplaceLineBreaks(errorDetail.Error!.Message)); 417Write(ex.Message); 475Write(errorDetail.Error!.Message);
Microsoft.AspNetCore.Server.IntegrationTesting (5)
Common\RetryHelper.cs (1)
58logger.LogWarning("Failed to complete the request : {0}.", exception.Message);
Deployers\ApplicationDeployer.cs (1)
158Logger.LogWarning("User cleanup code failed with exception : {exception}", exception.Message);
PublishedApplication.cs (1)
24e => _logger.LogWarning($"Failed to delete directory : {e.Message}"),
src\aspnetcore\src\Shared\Process\ProcessExtensions.cs (2)
73catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory")) 89catch (Win32Exception ex) when (ex.Message.Contains("No such file or directory"))
Microsoft.AspNetCore.Server.Kestrel.Core (39)
Internal\Http2\Http2Connection.cs (3)
352AbortStream(_incomingFrame.StreamId, new IOException(ex.Message, ex)); 1684throw new Http2ConnectionErrorException(bre.Message, Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.MaxRequestHeaderCountExceeded); 1689throw new Http2ConnectionErrorException(bre.Message, Http2ErrorCode.PROTOCOL_ERROR, ConnectionEndReason.InvalidRequestHeaders);
Internal\Http2\Http2FrameWriter.cs (2)
559_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.ErrorWritingHeaders); 600_http2Connection.Abort(new ConnectionAbortedException(ex.Message, ex), Http2ErrorCode.INTERNAL_ERROR, ConnectionEndReason.ErrorWritingHeaders);
Internal\Http3\Http3Connection.cs (5)
178session.Value.Abort(new ConnectionAbortedException(ex.Message, ex.InnerException), errorCode); 182session.Value.Abort(new ConnectionAbortedException(ex.Message), errorCode); 456Log.Http3StreamAbort(CoreStrings.FormatUnidentifiedStream(ex.StreamId), Http3ErrorCode.StreamCreationError, new(ex.Message)); 746Abort(new ConnectionAbortedException(connectionError.Message, connectionError), connectionError.ErrorCode, ConnectionEndReason.ClosedCriticalStream); 875Abort(new ConnectionAbortedException(ex.Message, ex), ex.ErrorCode, ex.Reason);
Internal\Http3\Http3ControlStream.cs (1)
241Abort(new ConnectionAbortedException(ex.Message), ex.ErrorCode);
Internal\Http3\Http3FrameWriter.cs (5)
321_connectionContext.Abort(new ConnectionAbortedException(ex.Message, ex)); 322_http3Stream.Abort(new ConnectionAbortedException(ex.Message, ex), Http3ErrorCode.InternalError); 376_connectionContext.Abort(new ConnectionAbortedException(ex.Message, ex)); 377_http3Stream.Abort(new ConnectionAbortedException(ex.Message, ex), Http3ErrorCode.InternalError); 378throw new InvalidOperationException(ex.Message, ex); // Report the error to the user if this was the first write.
Internal\Http3\Http3Stream.cs (4)
208abortReason = new ConnectionAbortedException(exception.Message, exception); 420throw new Http3StreamErrorException(bre.Message, Http3ErrorCode.MessageError); 727Abort(new ConnectionAbortedException(ex.Message, ex), ex.ErrorCode); 899throw new Http3StreamErrorException(ex.Message, Http3ErrorCode.InternalError);
Internal\Infrastructure\KestrelTrace.BadRequests.cs (1)
13BadRequestsLog.ConnectionBadRequest(_badRequestsLogger, connectionId, ex.Message, ex);
Internal\WebTransport\WebTransportSession.cs (2)
109stream.Value.Abort(new ConnectionAbortedException(exception.Message, exception.InnerException)); 113stream.Value.Abort(new ConnectionAbortedException(exception.Message));
LocalhostListenOptions.cs (2)
51context.Logger.LogInformation(0, CoreStrings.NetworkInterfaceBindingFailed, GetDisplayName(), "IPv4 loopback", ex.Message); 65context.Logger.LogInformation(0, CoreStrings.NetworkInterfaceBindingFailed, GetDisplayName(), "IPv6 loopback", ex.Message);
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (3)
146Log.MacOSAddCertificateToUserProfileDirError(candidate.Thumbprint, ex.Message); 323Log.MacOSAddCertificateToUserProfileDirError(certificate.Thumbprint, ex.Message); 464Log.MacOSRemoveCertificateFromUserProfileDirError(certificate.Thumbprint, ex.Message);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (11)
229Log.UnixDotnetTrustException(ex.Message); 434Log.WslWindowsTrustException(ex.Message); 459Log.UnixDotnetUntrustException(ex.Message); 722Log.UnixNssDbCheckException(nssDb.Path, ex.Message); 750Log.UnixNssDbAdditionException(nssDb.Path, ex.Message); 779Log.UnixNssDbRemovalException(nssDb.Path, ex.Message); 799Log.UnixFirefoxProfileEnumerationException(firefoxDirectory, ex.Message); 825Log.UnixCertificateFileDeletionException(certPath, ex.Message); 959Log.UnixOpenSslVersionException(ex.Message); 994Log.UnixOpenSslHashException(certificatePath, ex.Message); 1069Log.UnixOpenSslRehashException(ex.Message);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeConnection.cs (1)
227NamedPipeLog.ConnectionDisconnect(_log, this, _shutdownReason.Message);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (13)
Internal\QuicConnectionContext.cs (2)
87QuicLog.ConnectionAbort(_log, this, resolvedErrorCode, abortReason.Message); 146throw new ConnectionResetException(ex.Message, ex);
Internal\QuicConnectionListener.cs (1)
132throw new AddressInUseException(e.Message, e);
Internal\QuicStreamContext.cs (8)
282error = new ConnectionResetException(ex.Message, ex); 292error = new ConnectionResetException(ex.Message, ex); 297error = new ConnectionAbortedException(ex.Message, ex); 444shutdownReason = new ConnectionResetException(ex.Message, ex); 454shutdownReason = new ConnectionResetException(ex.Message, ex); 461shutdownReason = new ConnectionResetException(ex.Message, ex); 508QuicLog.StreamAbort(_log, this, resolvedErrorCode, abortReason.Message); 532QuicLog.StreamShutdownWrite(_log, this, _shutdownReason.Message);
Internal\QuicStreamContext.FeatureCollection.cs (2)
70QuicLog.StreamAbortRead(_log, this, errorCode, abortReason.Message); 92QuicLog.StreamAbortWrite(_log, this, errorCode, abortReason.Message);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Internal\SocketConnection.cs (2)
387SocketsLog.ConnectionWriteRst(_logger, this, shutdownReason.Message); 394SocketsLog.ConnectionWriteFin(_logger, this, _shutdownReason.Message);
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1743await SendWithLock(connectionState, CompletionMessage.WithError(invocation.InvocationId!, resultException.Message), cancellationToken: default).ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Common (4)
Protocol\HubMethodInvocationMessage.cs (4)
108args = $"Error: {ex.Message}"; 117streamIds = $"Error: {ex.Message}"; 163args = $"Error: {ex.Message}"; 172streamIds = $"Error: {ex.Message}";
Microsoft.AspNetCore.SignalR.Core (1)
Internal\ErrorMessageHelper.cs (1)
12return $"{message} {exception.GetType().Name}: {exception.Message}";
Microsoft.AspNetCore.SignalR.Protocols.Json (2)
Protocol\JsonHubProtocol.cs (2)
250error = $"Error trying to deserialize result to {returnType.Name}. {ex.Message}"; 447error = $"Error trying to deserialize result to {returnType.Name}. {ex.Message}";
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
Protocol\MessagePackHubProtocolWorker.cs (1)
197error = $"Error trying to deserialize result to {itemType.Name}. {ex.Message}";
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (2)
Protocol\NewtonsoftJsonHubProtocol.cs (2)
240error = $"Error trying to deserialize result to {returnType.Name}. {ex.Message}"; 443error = $"Error trying to deserialize result to {returnType.Name}. {ex.Message}";
Microsoft.AspNetCore.SignalR.Specification.Tests (7)
HubLifetimeManagerTestBase.cs (3)
224Assert.Equal("Error from client", ex.Message); 254Assert.Equal($"Connection ID '{connection2.ConnectionId}' is not valid for invocation ID '{invocation.InvocationId}'.", ex.Message); 338Assert.Equal($"Connection '{connection1.ConnectionId}' disconnected.", ex.Message);
ScaleoutHubLifetimeManagerTests.cs (4)
525Assert.Equal("Error from client", ex.Message); 576Assert.Equal("Connection disconnected.", ex.Message); 627Assert.Equal("Connection '1234' does not exist.", ex.Message); 657Assert.StartsWith("Error trying to deserialize result to Int32.", ex.Message);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
124$"The underlying exception message was '{ex.Message}'." +
Microsoft.AspNetCore.Testing.Tests (2)
FakesExtensionsTests.cs (2)
113Assert.Equal("No suitable address found to call the server.", exception.Message); 125Assert.Equal("No suitable address found to call the server.", exception.Message);
Microsoft.Build (108)
BackEnd\BuildManager\BuildManager.cs (2)
2070LogInvalidProjectFileError(new InvalidProjectFileException(ex.Message, ex)); 3623LogErrorAndShutdown(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ErrorReadingCacheFile", inputCacheFile, exception.Message));
BackEnd\BuildManager\CacheSerialization.cs (1)
95return ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("ErrorWritingCacheFile", outputCacheFile, e.Message);
BackEnd\BuildManager\CoordinatorClient.Connection.cs (1)
93output.WriteLine($"CoordinatorClient: Exception during handshake: {ex.Message}");
BackEnd\BuildManager\CoordinatorClient.cs (2)
151output.WriteLine($"CoordinatorClient: Exception during connect: {ex.Message}"); 274output.WriteLine($"CoordinatorClient: Failed to check server mutex: {ex.Message}");
BackEnd\BuildManager\CoordinatorClient.TestAccessor.cs (1)
49output.WriteLine($"CoordinatorClient: Exception during test connect: {ex.Message}");
BackEnd\Client\MSBuildClient.cs (1)
800LogConnectFailureDiagnostics(timeoutMilliseconds, isTimeout: false, errorMessage: ex.Message);
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
1453TraceEngine($"EL: EXCEPTION caught in engine: {e.GetType()} - {e.Message}"); 1468InternalError.Throw(e.Message, e);
BackEnd\Components\Communications\NodeFailedToLaunchException.cs (1)
34: base(innerException.Message, innerException)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (3)
617CommunicationsUtilities.Trace($"Skipping process {process.Id} - error retrieving command line: {ex.Message}"); 735CommunicationsUtilities.Trace($"Error counting system-wide nodes with mode {nodeMode}: {ex.Message}"); 850CommunicationsUtilities.Trace($"Failed to connect to pipe {pipeName}. {e.Message.TrimEnd()}");
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
424"CannotEvaluateItemMetadata", metadataName, e.Message);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
815_nodeLoggingContext.LogWarning("SolutionParseUnknownProjectType", ex.Message); 819_projectLoggingContext.LogWarning("SolutionParseUnknownProjectType", ex.Message); 865InternalError.Throw(ex.Message, ex);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (5)
176ex.Message); 880throw new LoggerException(taskException.Message, taskException); 889throw new InternalLoggerException(taskException.Message, taskException, ex.BuildEventArgs, ex.ErrorCode, ex.HelpKeyword, ex.InitializationException); 907throw new BuildAbortedException(taskException.Message, (BuildAbortedException)taskException); 941throw new Exception(taskException.Message, taskException);
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (4)
319ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(location), e, "CouldNotLoadSdkResolverAssembly", resolverPath, e.Message); 334string message = e.InnerException?.Message ?? e.Message; 340ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(location), e, "CouldNotLoadSdkResolver", type.Name, e.Message);
BackEnd\Node\InProcNode.cs (1)
194InternalError.Throw(e.Message, e);
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (7)
592_taskLoggingContext.LogError(new BuildEventFileInfo(_taskLocation), "TaskParametersError", _taskName, e.Message); 703e.Message); 726e.InnerException?.Message); 735e.Message); 1345e.Message); 1366e.Message); 2039_targetLoggingContext.LogError(new BuildEventFileInfo(_taskLocation), "AttributeTypeLoadError", _taskName, e.Message);
BuildCheck\Acquisition\BuildCheckAcquisitionModule.cs (1)
76checkContext.DispatchAsComment(MessageImportance.Normal, "CustomCheckFailedRuleLoading", ex.Message);
BuildCheck\Infrastructure\BuildCheckCentralContext.cs (1)
309$"The check '{checkCallback.Item1.Check.FriendlyName}' threw an exception while executing a registered action with message: {e.Message}");
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (4)
239e.Message); 309string message = $"The check '{check.FriendlyName}' failed to register actions with the following message: '{e.Message}'"; 350e.Message); 776$"The Check '{ba.FriendlyName}' failed to initialize: {e.Message}", e);
Construction\ProjectRootElement.cs (2)
2069ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(projectFile), ex, "InvalidProjectFile", ex.Message); 2124ProjectFileErrorUtilities.ThrowInvalidProjectFile(fileInfo, ex, "InvalidProjectFile", ex.Message);
Construction\Solution\ProjectInSolution.cs (4)
368_canBeMSBuildProjectFileErrorMessage = e.Message; 373_canBeMSBuildProjectFileErrorMessage = e.Message; 378_canBeMSBuildProjectFileErrorMessage = e.Message; 383_canBeMSBuildProjectFileErrorMessage = e.Message;
Construction\Solution\SolutionFile.cs (5)
750ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(_solutionFile), "InvalidProjectFile", e.Message); 1231etpProj.RelativePath, e.Message); 1240etpProj.RelativePath, e.Message); 1249etpProj.RelativePath, e.Message); 1258etpProj.RelativePath, e.Message);
Construction\Solution\SolutionProjectGenerator.cs (1)
2263e.Message);
Definition\Toolset.cs (4)
615e.Message); 866loggingContext.LogError(new BuildEventFileInfo(/* this warning truly does not involve any file it is just gathering properties */String.Empty), "TasksPropertyBagError", e.Message); 913string rootedPathMessage = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("OverrideTaskProblemWithPath", _overrideTasksPath, e.Message); 960taskFileError, e.Message);
Errors\InvalidProjectFileException.cs (2)
253return base.Message + ((!String.IsNullOrEmpty(ProjectFile)) 267return base.Message;
Evaluation\Evaluator.cs (5)
381ex.Message); 1903ProjectErrorUtilities.ThrowInvalidProject(importElement.SdkLocation, "SDKResolverCriticalFailure", e.Message); 2162ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValueWithException", EscapingUtilities.UnescapeAll(importExpressionEscapedItem), XMakeAttributes.project, XMakeElements.import, ex.Message); 2207ProjectErrorUtilities.ThrowInvalidProject(importLocationInProject, "InvalidAttributeValueWithException", importFileUnescaped, XMakeAttributes.project, XMakeElements.import, ex.Message); 2425importFileUnescaped, ex.InnerException.Message);
Evaluation\Expander.Function.cs (4)
526ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.Message.Replace("\r\n", " ")); 597ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.InnerException.Message.Replace("\r\n", " ")); 608ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionStaticMethodSyntax", _expression, ex.Message.Replace("Microsoft.Build.Evaluation.IntrinsicFunctions.", "[MSBuild]::")); 614ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.Message);
Evaluation\Expander.ItemExpander.Transforms.cs (10)
130ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidItemFunctionExpression", functionName, item.Value, e.Message); 190ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidItemFunctionExpression", functionName, item.Value, e.Message); 286ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidItemFunctionExpression", functionName, item.Value, e.Message); 367ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidItemFunctionExpression", functionName, item.Value, e.Message); 415ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message); 815ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message); 855ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message); 893ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message); 934ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message); 991ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotEvaluateItemMetadata", match.Name, ex.Message);
Evaluation\Expander.MetadataExpander.cs (1)
84ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "CannotExpandItemMetadata", expression, ex.Message);
Evaluation\Expander.PropertyExpander.cs (1)
638ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "InvalidRegistryPropertyExpression", $"$({registryExpression})", ex.Message);
Graph\GraphBuilder.cs (1)
560string innerDetail = ex.InnerException?.Message;
Instance\TaskFactories\AssemblyTaskFactory.cs (4)
281targetLoggingContext.LogError(new BuildEventFileInfo(taskProjectFile), "TaskLoadFailure", taskName, loadInfo.AssemblyLocation, exception.Message); 294ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, loadInfo.AssemblyLocation, e.Message); 478targetLoggingContext.LogError(new BuildEventFileInfo(taskProjectFile), "TaskLoadFailure", taskName, _loadedType.Assembly.AssemblyLocation, exception.Message); 498ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, _loadedType.Assembly.AssemblyLocation, e.Message);
Instance\TaskFactories\TaskHostTask.cs (1)
852e.Message);
Instance\TaskRegistry.cs (4)
1480targetLoggingContext.LogError(new BuildEventFileInfo(taskProjectFile), "TaskFactoryLoadFailure", TaskFactoryAttributeName, taskFactoryLoadInfo.AssemblyLocation, exception.Message); 1488ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskFactoryLoadFailure", TaskFactoryAttributeName, taskFactoryLoadInfo.AssemblyLocation, e.Message); 1568message += e.Message; 1586e.Message;
Logging\BinaryLogger\BinaryLogger.cs (3)
402string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(out errorCode, out helpKeyword, "InvalidFileLoggerFile", FilePath, e.Message); 581ex.Message); 702string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(out errorCode, out helpKeyword, "InvalidFileLoggerFile", FilePath, e.Message);
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
250_recordNumber, localSerializedEventLength, localException.GetType(), localException.Message) + (_skipUnknownEvents
Logging\FileLogger.cs (2)
124string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(out errorCode, out helpKeyword, "InvalidFileLoggerFile", _logFileName, e.Message); 153string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(out errorCode, out helpKeyword, "InvalidFileLoggerFile", _logFileName, ex.Message);
Logging\LoggerDescription.cs (2)
229string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("LoggerInstantiationFailureErrorInvalidCast", _loggerClassName, _loggerAssembly.AssemblyLocation, e.Message); 240throw new LoggerException(le.Message, le, le.ErrorCode, le.HelpKeyword);
Logging\ProfilerLogger.cs (1)
307Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ErrorWritingProfilerReport", ex.Message));
src\msbuild\src\Shared\Debugging\PrintLineDebuggerWriters.cs (1)
33File.AppendAllText(errorFile, $"{SimpleFormat(id, callsite, args)}\n{e.Message}\n{e.StackTrace}");
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
508CommunicationsUtilities.Trace($"Client connection failed but we will wait for another connection. Exception: {e.Message}");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
311InternalError.Throw(e.Message); 318InternalError.Throw(e.Message);
src\msbuild\src\Shared\TaskLoggingHelper.cs (5)
535StringBuilder flattenedMessage = new StringBuilder(e.Message); 540flattenedMessage.Append(" ---> ").Append(excep.Message); 1274string message = exception.Message; 1647string message = exception.Message; 1662builder.AppendLine(currentException.Message);
Microsoft.Build.Framework (16)
BuildException\BuildExceptionBase.cs (1)
83writer.Write(exception.Message);
EncodingUtilities.cs (1)
82Debug.Assert(false, "GetEncoding(default OEM encoding) threw a NotSupportedException in EncodingUtilities.CurrentSystemOemEncoding! Please log a bug against MSBuild.", ex.Message);
FileSystem\NativeWin32Exception.cs (4)
15/// associated recent error code (<see cref="System.Runtime.InteropServices.Marshal.GetLastWin32Error" />). The <see cref="Exception.Message" /> 29/// The exception's <see cref="Exception.Message" /> includes the error code, a system-provided message describing it, 42/// The exception's <see cref="Exception.Message" /> includes the error code and a system-provided message describing it. 55string systemMessage = new Win32Exception(nativeErrorCode).Message;
FileUtilities_TempFiles.cs (1)
206throw new IOException(SR.FormatFailedCreatingTempFile(ex.Message), ex);
ITaskItemExtensions.cs (1)
58valueOrError = e.Message;
ItemSpecModifiers.cs (1)
474throw new InvalidOperationException(SR.FormatInvalidFilespecForTransform(modifier, itemSpec, e.Message));
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Telemetry\BuildCheckTelemetry.cs (1)
34string? sanitizedMessage = CrashTelemetry.TruncateMessage(exception.Message);
Telemetry\CrashTelemetry.cs (2)
404ExceptionMessage = TruncateMessage(exception.Message); 428InnerExceptionMessage = TruncateMessage(inner.Message);
Telemetry\CrashTelemetryRecorder.cs (1)
190: base(CrashTelemetry.TruncateMessage(original.Message) ?? original.GetType().FullName,
Utilities\FrameworkLocationHelper.cs (1)
1048throw new InvalidOperationException(SR.FormatCouldNotGenerateReferenceAssemblyDirectory(targetFrameworkRootPath, frameworkName.ToString(), e.Message));
Microsoft.Build.NuGetSdkResolver (4)
GlobalJsonReader.cs (3)
76context.Logger.LogMessage(string.Format(CultureInfo.CurrentCulture, Strings.FailedToFindPathToGlobalJson, startingPath, e.Message)); 254sdkResolverContext.Logger.LogMessage(string.Format(CultureInfo.CurrentCulture, Strings.FailedToReadGlobalJson, globalJsonPath, e.Message)); 275sdkResolverContext.Logger.LogMessage(string.Format(CultureInfo.CurrentCulture, Strings.FailedToParseGlobalJson, globalJsonPath, e.Message));
NuGetSdkResolver.cs (1)
177logger.LogError(string.Format(CultureInfo.CurrentCulture, Strings.Error_FailedToReadSettings, e.Message));
Microsoft.Build.Tasks.CodeAnalysis (11)
src\roslyn\src\Compilers\Core\MSBuildTask\CopyRefAssembly.cs (1)
51Log.LogMessageFromResources(MessageImportance.High, "CopyRefAssembly_BadSource3", SourcePath, e.Message, e.StackTrace);
src\roslyn\src\Compilers\Core\MSBuildTask\Csc.cs (2)
562Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message); 696Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message);
src\roslyn\src\Compilers\Core\MSBuildTask\Vbc.cs (2)
335Log.LogErrorWithCodeFromResources("VBC_RenamePDB", PdbFile, e.Message); 989Log.LogErrorWithCodeFromResources("General_CouldNotSetHostObjectParameter", param, e.Message);
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
306return new RejectedBuildResponse($"Error writing build request: {e.Message}"); 331response = new RejectedBuildResponse($"Error reading response: {e.Message}");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'"); 138Debug.Assert(false, e.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.Build.Tasks.Core (135)
AddToWin32Manifest.cs (1)
163Log.LogErrorWithCodeFromResources(null, manifestDisplayPath, 0, 0, 0, 0, "AddToWin32Manifest.ManifestCanNotBeOpenedWithException", ex.Message);
AppConfig\AppConfig.cs (1)
65throw new AppConfigException(e.Message, appConfigFilePath, lineNumber, linePosition, e);
AppConfig\BindingRedirect.cs (2)
66ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidOldVersionAttribute", e.Message); 80ErrorUtilities.ThrowArgument(e, "AppConfig.InvalidNewVersionAttribute", e.Message);
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
147_taskLogger.LogError(ResourceUtilities.GetResourceString("ResolveAssemblyReference.AssemblyFoldersConfigFileMalformed"), _assemblyFolderConfigFile, e.Message);
AssemblyDependency\BadImageReferenceException.cs (3)
38public override string Message => (InnerException == null) ? base.Message : $"{base.Message} {InnerException.Message}";
AssemblyDependency\ReferenceTable.cs (8)
522reference.AddError(new DependencyResolutionException(e.Message, e)); 706reference.AddError(new BadImageReferenceException(e.Message, e)); 928throw new InvalidParameterValueException("AssemblyFiles", referenceAssemblyFile.ItemSpec, e.Message); 1020_log?.LogErrorFromResources("ResolveAssemblyReference.ProblemFindingSatelliteAssemblies", reference.FullPath, e.Message); 1230reference.AddError(new DependencyResolutionException(e.Message, e)); 1234reference.AddError(new DependencyResolutionException(e.Message, e)); 1802reference.AddError(new DependencyResolutionException(e.Message, e)); 2946_log.LogErrorWithCodeFromResources("ResolveAssemblyReference.ProblemReadingImplementationDll", dllPath, e.Message);
AssemblyDependency\ResolveAssemblyReference.cs (11)
1675throw new InvalidParameterValueException("CandidateAssemblyFiles", file, e.Message); 1877message = Log.FormatResourceString("ResolveAssemblyReference.FailedToResolveReference", itemError.Message); 1883message = Log.FormatResourceString("ResolveAssemblyReference.FailedToFindDependentFiles", itemError.Message); 1889message = Log.FormatResourceString("ResolveAssemblyReference.FailedWithException", itemError.Message); 2473Log.LogWarningWithCodeFromResources("ResolveAssemblyReference.InvalidInstalledAssemblyTablesFile", filename, RedistList.RedistListFolder, e.Message); 2483Log.LogWarningWithCodeFromResources("ResolveAssemblyReference.InvalidInstalledAssemblySubsetTablesFile", filename, SubsetListFinder.SubsetListFolder, e.Message); 2561Log.LogErrorWithCodeFromResources(null, e.FileName, e.Line, e.Column, 0, 0, "ResolveAssemblyReference.InvalidAppConfig", _appConfigFile.OriginalValue, e.Message); 2649Log.LogErrorWithCodeFromResources("ResolveAssemblyReference.ProblemDeterminingFrameworkMembership", e.Message); 2685Log.LogErrorWithCodeFromResources("ResolveAssemblyReference.ProblemDeterminingFrameworkMembership", e.Message); 2861"ResolveAssemblyReference.InvalidParameter", e.ParamName, e.ActualValue, e.Message); 3008Log.LogWarningWithCodeFromResources("ResolveAssemblyReference.InvalidProfileRedistLocation", filename, RedistList.RedistListFolder, e.Message);
AssemblyDependency\Resolver.cs (1)
337throw new InvalidParameterValueException("SearchPaths", fullPathToDirectory + (fullPathToDirectory.EndsWith("\\", StringComparison.OrdinalIgnoreCase) ? String.Empty : "\\") + baseName, e.Message);
BootstrapperUtil\BootstrapperBuilder.cs (8)
251_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.General", ex.Message)); 379_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyError", setupSourceFile, strOutputExe, ex.Message)); 384_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyError", setupSourceFile, strOutputExe, ex.Message)); 394_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyError", setupSourceFile, strOutputExe, ex.Message)); 1058Debug.Fail(ex.Message); 1485_results?.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyPackageError", packageFileSource.Value, builder.Name, ex.Message)); 1491_results?.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyPackageError", packageFileSource.Value, builder.Name, ex.Message)); 1503_results?.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyPackageError", packageFileSource.Value, builder.Name, ex.Message));
Copy.cs (3)
988Log.LogErrorWithCodeFromResources("Copy.Error", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, e.Message); 993Log.LogErrorWithCodeFromResources("Copy.Error", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, e.Message); 1084destinationFileState.Path.OriginalValue, retries, RetryDelayMilliseconds, e.Message,
CreateManifestResourceName.cs (1)
261Log.LogErrorWithCodeFromResources("CreateManifestResourceName.Error", resourceFile.ItemSpec, e.Message);
Delete.cs (3)
159Log.LogWarningWithCodeFromResources("Delete.Retrying", filePath?.OriginalValue ?? file.ItemSpec, retries, RetryDelayMilliseconds, e.Message, lockedFileMessage); 168Log.LogWarningWithCodeFromResources("Delete.Error", filePath?.OriginalValue ?? file.ItemSpec, e.Message, lockedFileMessage); 172Log.LogErrorWithCodeFromResources("Delete.Error", filePath?.OriginalValue ?? file.ItemSpec, e.Message, lockedFileMessage);
DownloadFile.cs (1)
120Log.LogWarningWithCodeFromResources("DownloadFile.Retrying", SourceUrl, retryAttemptCount + 1, RetryDelayMilliseconds, actualException.Message);
ErrorFromResources.cs (1)
77Log.LogErrorWithCodeFromResources("ErrorFromResources.LogErrorFailure", Resource, e.Message);
FileIO\ReadLinesFromFile.cs (1)
73Log.LogErrorWithCodeFromResources("ReadLinesFromFile.ErrorOrWarning", filePath.OriginalValue, e.Message);
FileIO\WriteLinesToFile.cs (4)
160Log.LogErrorWithCodeFromResources("WriteLinesToFile.ErrorOrWarning", filePath.OriginalValue, e.Message, lockedFileMessage); 196filePath.OriginalValue, attempt, maxAttempts, lastException.Message); 216Log.LogErrorWithCodeFromResources("WriteLinesToFile.ErrorOrWarning", filePath.OriginalValue, e.Message, lockedFileMessage); 258Log.LogErrorWithCodeFromResources("WriteLinesToFile.ErrorOrWarning", filePath.OriginalValue, e.Message, lockedFileMessage);
GenerateApplicationManifest.cs (1)
486Log.LogErrorWithCodeFromResources("GenerateManifest.ReadInputManifestFailed", InputManifest.ItemSpec, ex.Message);
GenerateManifestBase.cs (2)
481Log.LogErrorWithCodeFromResources("GenerateManifest.ReadInputManifestFailed", InputManifest.ItemSpec, ex.Message); 648Log.LogErrorWithCodeFromResources("GenerateManifest.WriteOutputManifestFailed", OutputManifest.ItemSpec, ex.Message, lockedFileMessage);
GenerateResource.cs (11)
1558Log.LogErrorWithCodeFromResources("GenerateResource.InvalidFilename", item.ItemSpec, e.Message); 1717Log.LogErrorWithCodeFromResources("GenerateResource.CannotWriteSTRFile", StronglyTypedFileName, e.Message); 2697"GenerateResource.MessageTunnel", tfe.Message); 2714"General.InvalidResxFile", e.Message); 2725"General.InvalidResxFile", e.Message); 2810_stronglyTypedFilename, e.Message); 2833FileUtilities.GetFullPathNoThrow(currentOutputFile), io.Message); 2867FileUtilities.GetFullPathNoThrow(inFile), e.Message); // Input file is more useful to log 2878FileUtilities.GetFullPathNoThrow(currentOutputFile), e.Message); 2963_logger.LogWarningWithCodeFromResources("GenerateResource.DeleteCorruptOutputFailed", FileUtilities.GetFullPathNoThrow(filename), deleteException.Message); 3604logger.LogErrorWithCodeFromResources("GenerateResource.STRCodeDomProviderFailed", stronglyTypedLanguage, e.Message);
GetAssemblyIdentity.cs (1)
87Log.LogErrorWithCodeFromResources("GetAssemblyIdentity.CouldNotGetAssemblyName", item.ItemSpec, e.Message);
GetInstalledSDKLocations.cs (1)
162Log.LogErrorWithCodeFromResources("GetInstalledSDKs.CouldNotGetSDKList", e.Message);
GetReferenceAssemblyPaths.cs (1)
238Log.LogErrorWithCodeFromResources("GetReferenceAssemblyPaths.ProblemGeneratingReferencePaths", TargetFrameworkMoniker, e.Message);
GetSDKReferenceFiles.cs (5)
292Log.LogErrorWithCodeFromResources("GetSDKReferenceFiles.CouldNotGetSDKReferenceFiles", e.Message); 973_exceptionMessages.Enqueue(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ProblemDeletingCacheFile", existingCacheFile, e.Message)); 986_exceptionMessages.Enqueue(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ProblemWritingCacheFile", referencesCacheFile, e.Message)); 1108_exceptionMessages.Enqueue(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ProblemGeneratingHash", currentAssembly, ex.Message)); 1142_exceptionMessages.Enqueue(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("GetSDKReferenceFiles.ProblemGettingAssemblyMetadata", referencePath, e.Message));
ListOperators\FindUnderPath.cs (2)
86"FindUnderPath.InvalidParameter", "Path", Path.ItemSpec, e.Message); 117"FindUnderPath.InvalidParameter", "Files", item.ItemSpec, e.Message);
MakeDir.cs (1)
87Log.LogErrorWithCodeFromResources("MakeDir.Error", absolutePath?.OriginalValue ?? directory.ItemSpec, e.Message);
ManifestUtil\LauncherBuilder.cs (2)
92_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateLauncher.General", ex.Message)); 114_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateLauncher.CopyError", launcher.OriginalValue, outputExe.OriginalValue, ex.Message));
ManifestUtil\Manifest.cs (2)
589OutputMessages.AddErrorMessage("GenerateManifest.General", e.Message); 606OutputMessages.AddErrorMessage("GenerateManifest.General", e.Message);
ManifestUtil\SecurityUtil.cs (1)
769throw new ApplicationException(ex.Message, ex);
Move.cs (1)
177Log.LogErrorWithCodeFromResources("Move.Error", sourceSpec, destinationSpec, e.Message, lockedFileMessage);
RemoveDir.cs (3)
135Log.LogErrorWithCodeFromResources("RemoveDir.Error", directoryPath.OriginalValue, e.Message); 141Log.LogErrorWithCodeFromResources("RemoveDir.Error", directoryPath.OriginalValue, e.Message); 179Log.LogErrorWithCodeFromResources("RemoveDir.Error", directory, e.Message);
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (1)
363log.LogErrorWithCodeFromResources("CodeTaskFactory.InvalidTaskXml", e.Message);
SignFile.cs (5)
80Log.LogErrorWithCodeFromResources("SignFile.SignToolError", ex.Message.Trim()); 85Log.LogWarningWithCodeFromResources("SignFile.SignToolWarning", ex.Message.Trim()); 90Log.LogErrorWithCodeFromResources("SignFile.SignToolError", ex.Message.Trim()); 95Log.LogErrorWithCodeFromResources("SignFile.SignToolError", ex.Message.Trim()); 100Log.LogErrorWithCodeFromResources("SignFile.SignToolError", ex.Message.Trim());
src\msbuild\src\Shared\Debugging\PrintLineDebuggerWriters.cs (1)
33File.AppendAllText(errorFile, $"{SimpleFormat(id, callsite, args)}\n{e.Message}\n{e.StackTrace}");
src\msbuild\src\Shared\NodePipeServer.cs (1)
138CommunicationsUtilities.Trace($"Client connection failed but we will wait for another connection. Exception: {e.Message}");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
311InternalError.Throw(e.Message); 318InternalError.Throw(e.Message);
StateFileBase.cs (3)
85log.LogWarningWithCodeFromResources("General.CouldNotWriteStateFile", stateFile.OriginalValue, e.Message); 158log.LogMessageFromResources("General.CouldNotReadStateFileMessage", stateFile.OriginalValue, e.Message); 184log.LogWarningWithCodeFromResources("General.CouldNotDeleteStateFile", stateFile, e.Message);
TarDirectory.cs (2)
178Log.LogErrorWithCodeFromResources("TarDirectory.ErrorFailed", _sourceDirectory.FullName, _destinationFile.FullName, e.Message, lockedFileMessage); 274Log.LogErrorWithCodeFromResources("TarDirectory.ErrorFailed", _sourceDirectory.FullName, _destinationFile.FullName, e.Message, string.Empty);
TaskEnvironmentExtensions.cs (1)
32log?.LogMessageFromResources(MessageImportance.Low, "General.FailedToCanonicalizePath", absolutePath.Value, e.Message);
Touch.cs (5)
87Log.LogErrorWithCodeFromResources("Touch.TimeSyntaxIncorrect", e.Message); 193Log.LogErrorWithCodeFromResources("Touch.CannotCreateFile", file.OriginalValue, e.Message); 266Log.LogErrorWithCodeFromResources("Touch.CannotMakeFileWritable", file.OriginalValue, e.Message, lockedFileMessage); 282Log.LogErrorWithCodeFromResources("Touch.CannotTouch", file.OriginalValue, e.Message, lockedFileMessage); 297Log.LogErrorWithCodeFromResources("Touch.CannotRestoreAttributes", file.OriginalValue, e.Message);
Untar.cs (7)
191Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotOpenFile", sourceFile.FullName, e.Message); 201Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotOpenFile", sourceFile.FullName, e.Message); 226Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotCreateDestinationDirectory", destinationFolderPath, e.Message); 308Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotCreateDestinationDirectory", destinationPath.FullName, e.Message); 338Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotCreateDestinationDirectory", destinationPath.DirectoryName, e.Message); 351Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotMakeFileWriteable", entryName, destinationPath.FullName, e.Message, lockedFileMessage); 373Log.LogErrorWithCodeFromResources("Untar.ErrorCouldNotExtractFile", entryName, destinationPath.FullName, e.Message);
Unzip.cs (5)
99Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotCreateDestinationDirectory", DestinationFolder.ItemSpec, e.Message); 159Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotOpenFile", sourceFile.ItemSpec, e.Message); 228Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotCreateDestinationDirectory", destinationPath.DirectoryName, e.Message); 241Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotMakeFileWriteable", zipArchiveEntry.FullName, destinationPath.FullName, e.Message, lockedFileMessage); 291Log.LogErrorWithCodeFromResources("Unzip.ErrorCouldNotExtractFile", zipArchiveEntry.FullName, destinationPath.FullName, e.Message);
WriteCodeFragment.cs (4)
139Log.LogErrorWithCodeFromResources("WriteCodeFragment.CouldNotWriteOutput", itemSpec, ex.Message, lockedFileMessage); 176Log.LogErrorWithCodeFromResources("WriteCodeFragment.CouldNotCreateProvider", Language, e.Message); 578Log.LogErrorWithCodeFromResources("WriteCodeFragment.CouldNotConvertValue", rawValue, typeName, ex.Message); 608Log.LogMessageFromResources("WriteCodeFragment.CouldNotConvertToInferredType", parameterName, inferredType.Name, ex.Message);
XmlPeek.cs (4)
79Log.LogErrorWithCodeFromResources("XmlPeek.ArgumentError", e.Message); 100Log.LogErrorWithCodeFromResources("XmlPeekPoke.InputFileError", XmlInputPath?.ItemSpec, e.Message); 119Log.LogErrorWithCodeFromResources("XmlPeekPoke.XPathError", Query, e.Message); 132Log.LogErrorWithCodeFromResources("XmlPeek.NamespacesError", e.Message);
XmlPoke.cs (4)
95Log.LogErrorWithCodeFromResources("XmlPeekPoke.InputFileError", XmlInputPath.ItemSpec, e.Message); 111Log.LogErrorWithCodeFromResources("XmlPeekPoke.XPathError", Query, e.Message); 125Log.LogErrorWithCodeFromResources("XmlPoke.NamespacesError", e.Message); 152Log.LogErrorWithCodeFromResources("XmlPoke.PokeError", Value.ItemSpec, e.Message);
XslTransformation.cs (4)
141Log.LogErrorWithCodeFromResources("XslTransform.ArgumentError", e.Message); 168Log.LogErrorWithCodeFromResources("XslTransform.XsltArgumentsError", e.Message); 192Log.LogErrorWithCodeFromResources("XslTransform.XsltLoadError", e.Message); 256Log.LogErrorWithCodeAndExceptionFromResources(e, true, true, "XslTransform.TransformError", [e.Message]);
ZipDirectory.cs (2)
98Log.LogErrorWithCodeFromResources("ZipDirectory.ErrorFailed", sourceDirectory.FullName, destinationFile.FullName, e.Message, lockedFileMessage); 141Log.LogErrorWithCodeFromResources("ZipDirectory.ErrorFailed", sourceDirectory.FullName, destinationFile.FullName, e.Message, string.Empty);
Microsoft.Build.Tasks.Git (6)
GitDataReader\GitConfig.Reader.cs (1)
217throw new IOException(e.Message, e);
GitDataReader\GitReferenceResolver.cs (1)
388throw new IOException(e.Message, e);
GitDataReader\GitRepository.cs (2)
267reportDiagnostic(e.Message); 436throw new IOException(e.Message, e);
RepositoryTask.cs (2)
97Log.LogError(Resources.ErrorReadingGitRepositoryInformation, e.Message); 144Log.LogError(Resources.ErrorReadingGitRepositoryInformation, e.Message);
Microsoft.Build.Utilities.Core (17)
PlatformManifest.cs (1)
159ReadErrorMessage = e.Message;
SDKManifest.cs (1)
361ReadErrorMessage = e.Message;
src\msbuild\src\Shared\Debugging\PrintLineDebuggerWriters.cs (1)
33File.AppendAllText(errorFile, $"{SimpleFormat(id, callsite, args)}\n{e.Message}\n{e.StackTrace}");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
311InternalError.Throw(e.Message); 318InternalError.Throw(e.Message);
src\msbuild\src\Shared\TaskLoggingHelper.cs (5)
535StringBuilder flattenedMessage = new StringBuilder(e.Message); 540flattenedMessage.Append(" ---> ").Append(excep.Message); 1274string message = exception.Message; 1647string message = exception.Message; 1662builder.AppendLine(currentException.Message);
ToolLocationHelper.cs (6)
868DebugTrace.WriteLine($"Encountered exception trying to get the SDK props file Location : {e.Message}"); 1065DebugTrace.WriteLine($"Encountered exception trying to gather the platform references: {e.Message}"); 1185DebugTrace.WriteLine($"Encountered exception trying to check if SDK is versioned: {e.Message}", category: "GetValueUsingMatchingSDKManifest"); 3081DebugTrace.WriteLine($"Encountered exception trying to gather platform-specific data: {e.Message}"); 3176ErrorUtilities.ThrowInvalidOperation("ToolsLocationHelper.InvalidRedistFile", redistFilePath, ex.Message); 3224ErrorUtilities.ThrowInvalidOperation("ToolsLocationHelper.CouldNotCreateChain", path, pathToReturn, e.Message);
ToolTask.cs (1)
917LogPrivate.LogWarningWithCodeFromResources("FailedDeletingTempFile", filePath.OriginalValue, e.Message, lockedFileMessage);
Microsoft.CodeAnalysis (63)
CodeGen\PermissionSetAttribute.cs (1)
108throw new PermissionSetFileReadException(e.Message, _resolvedPermissionSetFilePath);
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (3)
44var diagnosticInfo = new DiagnosticInfo(messageProvider, messageProvider.ERR_OutputWriteFailed, _filePath, e.Message); 121? (object)e.Message 126e.Message,
CommandLine\CommonCompiler.cs (3)
516diagnosticInfo = new DiagnosticInfo(messageProvider, messageProvider.ERR_NoSourceFile, filePath, e.Message); 1699diagnostics.Add(messageProvider.CreateDiagnostic(messageProvider.ERR_ErrorBuildingWin32Resource, Location.None, ex.Message)); 1733diagnostics.Add(messageProvider.CreateDiagnostic(errorCode, Location.None, fullPath, ex.Message));
Compilation.EmitStream.cs (1)
199diagnostics.Add(StrongNameKeys.GetError(_strongNameKeys.KeyFilePath, _strongNameKeys.KeyContainer, ex.Message, messageProvider));
Compilation\Compilation.cs (10)
2047diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2052diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2073diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message)); 2128diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_BadWin32Resource, NoLocation.Singleton, ex.Message)); 3353diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PdbWritingFailed, Location.None, ex.Message)); 3363diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_CantReadResource, Location.None, e.Message, e.InnerException?.Message ?? "")); 3368diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message)); 3590diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PdbWritingFailed, Location.None, e.Message)); 3600diagnostics.Add(MessageProvider.CreateDiagnostic(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message));
Diagnostic\CommonMessageProvider.cs (1)
261diagnostics.Add(CreateDiagnostic(ERR_OutputWriteFailed, Location.None, filePath, e.Message));
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
239throw new InvalidOperationException($"Unable to load {assemblyName.Name}: {ex.Message}", ex);
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
1442var messageArguments = new[] { analyzerName, e.GetType().ToString(), e.Message, contextInformation }; 1474return string.Format(CodeAnalysisResources.CompilerAnalyzerThrows, analyzerName, ex.GetType().ToString(), ex.Message, ex.CreateDiagnosticDescription()); 1489var messageArguments = new[] { e.GetType().ToString(), e.Message, e.CreateDiagnosticDescription() };
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
206string message = e.Message.Replace("\r", "").Replace("\n", "");
DiaSymReader\Writer\SymUnmanagedWriterException.cs (1)
41: this(innerException.Message, innerException, implementationModuleName)
DiaSymReader\Writer\SymUnmanagedWriterFactory.cs (1)
57throw new DllNotFoundException(loadException.Message, loadException);
Emit\EditAndContinue\DefinitionMap.cs (2)
360e.Message 445e.Message
FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
FileSystem\ICommonCompilerFileSystem.cs (2)
40throw new FileNotFoundException(e.Message, filePath, e); 48throw new IOException(e.Message, e);
InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
InternalUtilities\XmlUtilities.cs (2)
82errorMessage = e.Message; 87errorMessage = e.Message;
MetadataReference\PortableExecutableReference.cs (2)
191return messageProvider.CreateDiagnostic(errorCode, location, display, e.Message); 202return messageProvider.CreateDiagnostic(errorCode, location, display, e.Message);
NativePdbWriter\PdbWriter.cs (1)
758throw new SymUnmanagedWriterException(e.Message, e);
PEWriter\MetadataWriter.cs (1)
1782throw new SymUnmanagedWriterException(e.Message, e);
PEWriter\MetadataWriter.PortablePdb.cs (1)
859throw new SymUnmanagedWriterException(e.Message, e);
PEWriter\PeWriter.cs (2)
30: base(inner.Message, inner) 233throw new SymUnmanagedWriterException(e.Message, e);
RuleSet\RuleSet.cs (2)
317diagnosticsOpt.Add(Diagnostic.Create(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, e.Message)); 333diagnosticsOpt.Add(Diagnostic.Create(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, e.Message));
RuleSet\RuleSetInclude.cs (1)
71throw new InvalidRuleSetException(string.Format(CodeAnalysisResources.InvalidRuleSetInclude, path, e.Message));
RuleSet\RuleSetProcessor.cs (1)
77throw new InvalidRuleSetException(e.Message);
SourceGeneration\GeneratorDriver.cs (1)
620return Diagnostic.Create(descriptor, Location.None, generator.GetGeneratorType().Name, e.GetType().Name, e.Message, e.CreateDiagnosticDescription());
src\roslyn\src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
42return string.Join(s_separator, exception.Message, fusionLog);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
StrongName\DesktopStrongNameProvider.cs (5)
87return new StrongNameKeys(StrongNameKeys.GetKeyFileError(messageProvider, keyFilePath, ex.Message)); 104return new StrongNameKeys(StrongNameKeys.GetContainerError(messageProvider, keyContainerName, ex.Message)); 158throw new IOException(ex.Message); 239throw new IOException(ex.Message, ex); 261throw new IOException(ex.Message, ex);
StrongName\StrongNameKeys.cs (1)
117return new StrongNameKeys(GetKeyFileError(messageProvider, keyFilePath, ex.Message));
Microsoft.CodeAnalysis.Analyzers (12)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.CodeAnalysis.AnalyzerUtilities (12)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.CodeAnalysis.CodeStyle (13)
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
69Debug.Fail(ex.Message);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.CodeAnalysis.CSharp (5)
BoundTree\BoundTreeVisitors.cs (1)
168: base(inner.Message, inner)
CommandLine\CSharpCompiler.cs (1)
143diagnostics.Add(new DiagnosticInfo(MessageProvider, (int)ErrorCode.ERR_CantReadConfigFile, appConfigPath, ex.Message));
Compiler\DocumentationCommentCompiler.cs (1)
111diagnostics.Add(ErrorCode.ERR_DocFileGen, Location.None, e.Message);
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
346includeDiagnostics.Add(ErrorCode.WRN_FailedInclude, location, filePathValue, xpathValue, e.Message);
Emitter\EditAndContinue\EmitHelpers.cs (1)
106diagnostics.Add(ErrorCode.ERR_ModuleEmitFailure, NoLocation.Singleton, compilation.AssemblyName, e.Message);
Microsoft.CodeAnalysis.Extensions.Package (3)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.CodeAnalysis.Features (17)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
44return Diagnostic.Create(descriptor, Location.None, analyzerName, e.GetType(), e.Message);
EditAndContinue\CommittedSolution.cs (4)
420log.Write($"Source file of project '{projectName}' doesn't match output PDB: error opening PDB '{compilationOutputs.PdbDisplayPath}' (assembly: '{compilationOutputs.AssemblyDisplayPath}'): {e.Message}", LogMessageSeverity.Warning); 468log.Write($"Error calculating checksum for source file '{sourceFilePath}': '{e.Message}'", LogMessageSeverity.Error); 502debuggingSession.SessionLog.Write($"Unable to determine default defaultEncoding for '{document.FilePath}': {e.Message}"); 545log.Write($"Source '{sourceFilePath}' doesn't match output PDB: error reading symbols: {e.Message}", LogMessageSeverity.Error);
EditAndContinue\DebuggingSession.cs (3)
300return (Mvid: Guid.Empty, Error: Diagnostic.Create(descriptor, Location.None, [outputs.AssemblyDisplayPath, e.Message])); 427SessionLog.Write($"Failed to create baseline for '{projectId.DebugName}': {e.Message}", LogMessageSeverity.Error); 430diagnostics.Add(Diagnostic.Create(descriptor, Location.None, [fileBeingRead, e.Message]));
EditAndContinue\EditAndContinueDebugInfoReader.cs (3)
85throw new InvalidDataException(e.Message, e); 107throw new InvalidDataException(e.Message, e); 191throw new NotSupportedException($"Encoding '{encodingName}' not supported: {e.Message}");
EditAndContinue\Remote\RemoteEditAndContinueServiceProxy.cs (1)
88return new ManagedHotReloadAvailability(ManagedHotReloadAvailabilityStatus.InternalError, e.Message);
EditAndContinue\TraceLog.cs (1)
158=> AppendInMemory($"Error writing log file '{path}': {e.Message}");
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
97throw new IOException(e.Message, e);
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (1)
97_logger?.Log(FeaturesResources._0_found_in_embedded_PDB_but_could_not_write_file_1, sourceDocument.FilePath, ex.Message);
src\roslyn\src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (1)
69Debug.Fail(ex.Message);
src\roslyn\src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (1)
42return string.Join(s_separator, exception.Message, fusionLog);
Microsoft.CodeAnalysis.ResxSourceGenerator (12)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.CodeAnalysis.Scripting (4)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
82throw new ArgumentException(e.Message, nameof(directory)); 98throw new ArgumentException(e.Message, nameof(noShadowCopyDirectories));
Hosting\CommandLine\CommandLineRunner.cs (1)
350Console.Error.WriteLine(e.InnerException.Message);
Hosting\ObjectFormatter\CommonObjectFormatter.cs (1)
73builder.Append(e.Message);
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
503commentMessage = GenerateDiagnostic(True, location, ERRID.WRN_XMLDocBadFormedXML, filePathValue, xpathValue, e.Message)
Microsoft.CodeAnalysis.Workspaces (19)
Log\WorkspaceErrorLogger.cs (1)
25=> exception.Message + Environment.NewLine + exception.StackTrace;
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
239throw new InvalidOperationException($"Unable to load {assemblyName.Name}: {ex.Message}", ex);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Workspace\CommandLineProject.cs (1)
96throw new ArgumentException(string.Format(WorkspacesResources.An_error_occurred_while_reading_the_specified_configuration_file_colon_0, e.Message));
Workspace\Solution\TextLoader.cs (4)
112return CreateFailedText(e.Message); 119return CreateFailedText(e.Message); 141return CreateFailedText(e.Message); 148return CreateFailedText(e.Message);
Microsoft.CodeAnalysis.Workspaces.MSBuild (7)
MSBuild\MSBuildWorkspace.cs (7)
375Reporter.Report(new ProjectDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, projectChanges.ProjectId)); 392Reporter.Report(new ProjectDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, projectChanges.ProjectId)); 405Reporter.Report(new ProjectDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, projectChanges.ProjectId)); 532Reporter.Report(new DocumentDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, id)); 560Reporter.Report(new DocumentDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, documentId)); 564Reporter.Report(new DocumentDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, documentId)); 568Reporter.Report(new DocumentDiagnostic(WorkspaceDiagnosticKind.Failure, exception.Message, documentId));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
MSBuild\Logging\DiagnosticLog.cs (1)
40=> Add(new DiagnosticLogItem(kind, exception.Message, projectFilePath));
Rpc\RpcServer.cs (1)
186response = new Response { Id = request.Id, ExceptionMessage = $"An exception of type {e.GetType()} was thrown: {e.Message}", ExceptionStackTrace = e.StackTrace };
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (2)
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\BinderHelper.cs (1)
139Expression.Constant(e.Message)
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Contracts\StackWalk\StackWalk_1.cs (2)
363Debug.WriteLine($"Skipping frame at IP=0x{gcFrame.Frame.Context.InstructionPointer:X}: {ex.Message}"); 370Debug.WriteLine($"Exception during WalkStackReferences at IP=0x{gcFrame.Frame.Context.InstructionPointer:X}: {ex.GetType().Name}: {ex.Message}");
Microsoft.Diagnostics.DataContractReader.Legacy (1)
Dbi\DacDbiImpl.cs (1)
1775sb.Append($" | (decode failed: {ex.GetType().Name}: {ex.Message})");
Microsoft.Diagnostics.NETCore.Client (4)
DiagnosticsServerRouter\DiagnosticsServerRouterRunner.cs (2)
141routerFactory.Logger?.LogTrace($"runRouter continues after exception: {ex.Message}"); 147routerFactory.Logger?.LogInformation($"Shutting down due to error: {ex.Message}");
ReversedServer\ReversedDiagnosticsServer.cs (2)
119Debug.Fail(ex.Message); 132Debug.Fail(ex.Message);
Microsoft.DiaSymReader (3)
Reader\SymUnmanagedReaderFactory.cs (1)
68throw new DllNotFoundException(loadException.Message, loadException);
Writer\SymUnmanagedWriterException.cs (1)
39: this(innerException.Message, innerException, implementationModuleName)
Writer\SymUnmanagedWriterFactory.cs (1)
58throw new DllNotFoundException(loadException.Message, loadException);
Microsoft.DotNet.ApiCompat.Task (1)
src\sdk\src\Tasks\Common\TaskBase.cs (1)
40Log.LogError(e.Message);
Microsoft.DotNet.Arcade.Sdk (4)
src\CheckRequiredDotNetVersion.cs (2)
52Log.LogError($"Error accessing file '{globalJsonPath}': {e.Message}"); 77Log.LogError($"Error reading file '{globalJsonPath}': {e.Message}");
src\DownloadFile.cs (2)
213Log.LogMessage($"Failed to download '{uri}' to '{DestinationPath}': {e.Message}"); 218Log.LogMessage($"Retrying download of '{uri}' to '{DestinationPath}' due to failure: '{e.Message}' ({attempt}/{Retries})");
Microsoft.DotNet.Build.Tasks.Feed (1)
src\common\NativeMethods.cs (1)
25errorMessage = hardLinkCreated ? null : Marshal.GetExceptionForHR(Marshal.GetHRForLastWin32Error()).Message;
Microsoft.DotNet.Build.Tasks.Installers (2)
src\CreateWixBuildWixpack.cs (2)
223Log.LogError($"Error ingesting variables from include file {file}: {ex.Message}"); 626Log.LogError($"Error processing {copiedXmlPath}: {ex.Message}");
Microsoft.DotNet.Build.Tasks.VisualStudio (5)
OptProf\FindLatestDrop.cs (1)
45Log.LogError($"Error parsing file '{DropListPath}': {e.Message}");
OptProf\GenerateTrainingInputFiles.cs (1)
54Log.LogError($"Unable to open the config file '{ConfigurationFile}': {e.Message}");
OptProf\GetRunSettingsSessionConfiguration.cs (3)
70Log.LogError(e.Message); 92$"Unable to read bootstrapper info: {e.Message}{Environment.NewLine}" + 118throw new ApplicationException($"Unable to read config file '{configPath}': {e.Message}");
Microsoft.DotNet.Cli.Telemetry (3)
Implementation\AzureMonitorLogSerializer.cs (3)
76var message = logRecord.Exception?.Message ?? logRecord.FormattedMessage; 82if (logRecord.Exception?.Message is not null) 181Message = BreezeSchema.Truncate(exception.Message, BreezeSchema.ExceptionMessageMaxLength),
Microsoft.DotNet.HotReload.Utils.Generator.Frontend (1)
Frontend.cs (1)
28Console.Error.WriteLine ($"Error: {exn.Message}");
Microsoft.DotNet.HotReload.Watch (26)
Build\ProjectGraphFactory.cs (2)
103logger.LogError(e.Message); 107logger.LogWarning(e.Message);
FileWatcher\FileWatcher.cs (1)
158logger.LogWarning("The file watcher observing '{WatchedDirectory}' encountered an error: {Message}", watcher.WatchedDirectory, error.Message);
HotReload\HotReloadDotNetWatcher.cs (1)
748_context.Logger.LogDebug("Copy failed: {Message}", e.Message);
Process\LaunchSettingsProfile.cs (1)
54logger.LogDebug("Error reading '{Path}': {Message}.", launchSettingsPath, e.Message);
Process\ProcessRunner.cs (7)
84logger.Log(MessageDescriptor.ApplicationFailed, e.Message); 187logger.Log(MessageDescriptor.ErrorReadingProcessOutput, "stdout", state.ProcessId, e.Message); 202logger.Log(MessageDescriptor.ErrorReadingProcessOutput, "stderr", state.ProcessId, e.Message); 228logger.Log(MessageDescriptor.FailedToLaunchProcess, processSpec.Executable, argsDisplay, e.Message); 339logger.Log(MessageDescriptor.FailedToKillProcess, state.ProcessId, e.Message); 356logger.Log(MessageDescriptor.FailedToSendSignalToProcess, signalName, state.ProcessId, e.Message); 386error = ex.Message;
src\sdk\src\Dotnet.Watch\AspireService\AspireServerService.cs (1)
200Log($"[#{sessionId}] Failed to send message: {e.Message}");
src\sdk\src\Dotnet.Watch\AspireService\Helpers\ExceptionExtensions.cs (4)
25msg = e.Message; 30msg += e.Message; 36msg = ex.Message; 40msg += ex.InnerException.Message;
src\sdk\src\Dotnet.Watch\HotReloadClient\DefaultHotReloadClient.cs (2)
87Logger.LogError("Failed to read capabilities: {Message}", e.Message); 302Logger.LogError("Failed to send {RequestType}: {Message}", nameof(RequestType.InitialUpdatesCompleted), e.Message);
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClient.cs (1)
170Logger.Log(LogEvents.UpdateBatchFailedWithError, batchId, e.Message);
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClients.cs (1)
196clients.First().Logger.LogError("Failed to read file {FilePath}: {Message}", asset.FilePath, e.Message);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\BrowserConnection.cs (2)
49ServerLogger.LogDebug("Failed to send message: {Message}", e.Message); 76ServerLogger.LogDebug("Failed to receive response: {Message}", e.Message);
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\StaticWebAssetsManifest.cs (1)
122logger.LogError("Failed to read '{FilePath}': {Message}", path, e.Message);
src\sdk\src\Dotnet.Watch\HotReloadClient\WebSocketClientTransport.cs (1)
142logger.LogWarning("WebSocket connection rejected: invalid shared secret - {Message}", ex.Message);
UI\PhysicalConsole.cs (1)
72error = ex.Message;
Microsoft.DotNet.HotReload.WebAssembly.Browser (5)
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (4)
96Reporter.Report($"Error retrieving capabilities: {e.Message}", AgentMessageSeverity.Error); 202handler(codeField.GetValue(e) is int code ? code : 0, e.Message); 212Reporter.Report($"Failed to install HotReloadException handler: {e.Message}", AgentMessageSeverity.Verbose); 245Reporter.Report($"Failed to load type 0x{updatedType:X8}: {e.Message}", AgentMessageSeverity.Warning);
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
310reporter.Report($"'{assembly.FullName}' is not loaded ({e.Message})", AgentMessageSeverity.Verbose);
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\ReplacePackageParts.cs (1)
185Log.LogError($"Failed to open replacement file '{replacementFilePath}': {e.Message}");
Microsoft.DotNet.ProjectTools (1)
LaunchSettings\LaunchSettings.cs (1)
168return LaunchProfileParseResult.Failure(string.Format(Resources.DeserializationExceptionMessage, launchSettingsPath, ex.Message));
Microsoft.DotNet.VersionTools.Cli (2)
VersionTrimmingOperation.cs (2)
60_context.Logger.WriteError($"Asset {assetFileName} in not a valid nuget package: {e.Message}"); 75_context.Logger.WriteError($"Version trimming of {assetFileName} failed: {e.Message}");
Microsoft.Extensions.AI (4)
ChatCompletion\FunctionInvokingChatClient.cs (1)
1305message = $"{message} Exception: {result.Exception.Message}";
Common\FunctionInvocationProcessor.cs (1)
211.SetStatus(ActivityStatusCode.Error, e.Message);
Common\OpenTelemetryLog.cs (1)
30.SetStatus(ActivityStatusCode.Error, error.Message);
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
376? $"Error: {result.Exception.Message}"
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionResultContent.cs (1)
68$"{Exception.GetType().Name}(\"{Exception.Message}\")" :
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatRouting\RoutingChatClientTests.cs (2)
92Assert.Contains("SelectClientAsync", nonStreaming.Message, StringComparison.Ordinal); 93Assert.Contains("SelectClientAsync", streaming.Message, StringComparison.Ordinal);
Contents\FunctionCallContentTests.cs (4)
225Assert.Contains("JsonTypeInfo metadata", ex.Message); 226Assert.Contains(nameof(CustomType), ex.Message); 229Assert.Contains("JsonTypeInfo metadata", ex.Message); 230Assert.Contains(nameof(CustomType), ex.Message);
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (3)
OllamaSharpChatClientIntegrationTests.cs (2)
102Assert.Contains("inexistent-model", ex.Message); 105Assert.Contains("inexistent-model", ex.Message);
OllamaSharpEmbeddingGeneratorIntegrationTests.cs (1)
33Assert.Contains("inexistent-model", ex.Message);
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIChatClientTests.cs (2)
1634Assert.StartsWith("User-Agent header: OpenAI", e.Message); 1635Assert.Contains("MEAI", e.Message);
OpenAIEmbeddingGeneratorTests.cs (2)
313Assert.StartsWith("User-Agent header: OpenAI", e.Message); 314Assert.Contains("MEAI", e.Message);
OpenAIResponseClientIntegrationTests.cs (2)
762Assert.Contains("encrypted", ex.Message, StringComparison.OrdinalIgnoreCase); 848Assert.Contains("encrypted", ex.Message, StringComparison.OrdinalIgnoreCase);
OpenAIResponseClientTests.cs (2)
3762Assert.StartsWith("User-Agent header: OpenAI", e.Message); 3763Assert.Contains("MEAI", e.Message);
Microsoft.Extensions.AI.Templates.Tests (1)
ProcessExtensions.cs (1)
17catch (InvalidOperationException ex) when (ex.Message.Contains("No process is associated with this object"))
Microsoft.Extensions.AI.Tests (34)
ChatCompletion\ChatClientBuilderTest.cs (1)
78Assert.Contains("entry at index 0", ex.Message);
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (2)
268Assert.Equal("The deserialized response is null.", ex.Message); 287Assert.Equal("The response did not contain JSON to be deserialized.", ex.Message);
ChatCompletion\DistributedCachingChatClientTest.cs (4)
187Assert.Equal("some failure", ex1.Message); 195Assert.Equal("some failure", ex2.Message); 498Assert.Equal("some failure", ex1.Message); 507Assert.Equal("some failure", ex2.Message);
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (2)
1092Assert.Equal("ToolApprovalRequestContent found with FunctionCall.CallId(s) 'callId1' that have no matching ToolApprovalResponseContent.", invokeException.Message); 1096Assert.Equal("ToolApprovalRequestContent found with FunctionCall.CallId(s) 'callId1' that have no matching ToolApprovalResponseContent.", invokeStreamingException.Message);
ChatCompletion\FunctionInvokingChatClientTests.cs (8)
887Assert.Equal("Exception from call 11", ex.InnerExceptions[0].Message); 888Assert.Equal("Exception from call 12", ex.InnerExceptions[1].Message); 893Assert.Equal("Exception from call 11", ex.InnerExceptions[0].Message); 894Assert.Equal("Exception from call 12", ex.InnerExceptions[1].Message); 902Assert.Equal("Exception from call 11", ex.Message); 906Assert.Equal("Exception from call 11", ex.Message); 944Assert.Equal("It failed", ex.Message); 948Assert.Equal("It failed", ex.Message);
ChatCompletion\ReducingChatClientTests.cs (1)
135Assert.Contains("IChatReducer", exception.Message);
ChatRouting\FailoverChatClientTests.cs (6)
111Assert.Contains("SelectClientAsync", exception.Message, StringComparison.Ordinal); 399Assert.Equal("failed", Assert.IsType<InvalidOperationException>(failedAttempt.Exception).Message); 476Assert.Equal("failure 2", exception.Message); 630Assert.Equal("failed", exception.Message); 841Assert.Equal("failure 2", exception.Message); 1050Assert.Equal("mid-stream", exception.Message);
ChatRouting\OrderedFailoverChatClientTests.cs (2)
104Assert.Equal("failure 2", exception.Message); 123Assert.Equal("second", exception.Message);
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (2)
192Assert.Equal("some failure", ex1.Message); 200Assert.Equal("some failure", ex2.Message);
Embeddings\EmbeddingGeneratorBuilderTests.cs (1)
78Assert.Contains("entry at index 0", ex.Message);
Functions\AIFunctionFactoryTest.cs (3)
126Assert.Contains("'theParam'", e.Message); 918Assert.Contains("Unable to resolve", e.Message); 925Assert.Contains("Unable to resolve", e.Message);
Image\ImageGeneratorBuilderTests.cs (1)
78Assert.Contains("entry at index 0", ex.Message);
Realtime\OpenTelemetryRealtimeClientTests.cs (1)
247Assert.Equal("Streaming error", logEntry.Exception!.Message);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.L2.cs (1)
172Debug.WriteLine(ex.Message);
Microsoft.Extensions.Caching.Hybrid.Tests (2)
LogCollector.cs (1)
28var errSuffix = logItem.exception is null ? "" : $" - {logItem.exception.Message}";
SqlServerTests.cs (1)
47Log.WriteLine(ex.Message);
Microsoft.Extensions.Compliance.Testing (1)
FakeRedactorOptionsCustomValidator.cs (1)
25$"{nameof(options.RedactionFormat)} must be a valid .NET format string taking 0 or 1 arguments: {ex.Message}",
Microsoft.Extensions.DataIngestion (1)
IngestionPipeline.cs (1)
125.SetStatus(ActivityStatusCode.Error, ex.Message);
Microsoft.Extensions.DataIngestion.Tests (1)
Readers\DocumentReaderConformanceTests.cs (1)
174Assert.Skip($"Unable to download the test file: '{ex.Message}'");
Microsoft.Extensions.DependencyInjection (1)
ServiceProvider.cs (1)
253throw new InvalidOperationException($"Error while validating the service descriptor '{descriptor}': {e.Message}", e);
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (2)
AcceptanceTest.cs (1)
344Assert.Contains(typeof(IFakeService).FullName!, exception.Message);
AcceptanceTest.Keyed.cs (1)
338Assert.Contains(typeof(IFakeService).FullName!, exception.Message);
Microsoft.Extensions.Diagnostics.HealthChecks (1)
DefaultHealthCheckService.cs (1)
141description: ex.Message,
Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore (1)
DbContextHealthCheck.cs (1)
46return HealthCheckResult.Unhealthy(exception.Message, exception);
Microsoft.Extensions.Diagnostics.Probes.Tests (1)
KubernetesProbesOptionsValidatorTests.cs (1)
92Assert.Fail("Unexpected exception: " + ex.Message);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Windows\Disk\WindowsDiskMetrics.cs (2)
101_logger.DiskIoPerfCounterException(WindowsDiskPerfCounterNames.DiskIdleTimeCounter, ex.Message); 127_logger.DiskIoPerfCounterException(counterName, ex.Message);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes.Tests (9)
KubernetesMetadataTests.cs (7)
88Assert.Contains("LIMITS_MEMORY", exception.Message); 89Assert.Contains("is required and cannot be zero or missing", exception.Message); 117Assert.Contains("LIMITS_MEMORY", exception.Message); 118Assert.Contains("is required and cannot be zero or missing", exception.Message); 142Assert.Contains(varSuffix, exception.Message); 143Assert.Contains(invalidValue, exception.Message); 144Assert.Contains("Expected a non-negative integer", exception.Message);
KubernetesResourceQuotasServiceCollectionExtensionsTests.cs (2)
143Assert.Contains("LIMITS_MEMORY", exception.Message); 144Assert.Contains("is required and cannot be zero or missing", exception.Message);
Microsoft.Extensions.DotNetDeltaApplier (9)
src\sdk\src\Dotnet.Watch\HotReloadAgent.Host\Listener.cs (4)
44log(e.Message); 61log(e.Message); 128agent.Reporter.Report($"The runtime failed to applying the change: {e.Message}", AgentMessageSeverity.Error); 148agent.Reporter.Report($"Failed to apply static asset update: {e.Message}", AgentMessageSeverity.Error);
src\sdk\src\Dotnet.Watch\HotReloadAgent\HotReloadAgent.cs (4)
96Reporter.Report($"Error retrieving capabilities: {e.Message}", AgentMessageSeverity.Error); 202handler(codeField.GetValue(e) is int code ? code : 0, e.Message); 212Reporter.Report($"Failed to install HotReloadException handler: {e.Message}", AgentMessageSeverity.Verbose); 245Reporter.Report($"Failed to load type 0x{updatedType:X8}: {e.Message}", AgentMessageSeverity.Warning);
src\sdk\src\Dotnet.Watch\HotReloadAgent\MetadataUpdateHandlerInvoker.cs (1)
310reporter.Report($"'{assembly.FullName}' is not loaded ({e.Message})", AgentMessageSeverity.Verbose);
Microsoft.Extensions.Hosting (1)
Internal\HostingLoggerExtensions.cs (1)
21message = message + Environment.NewLine + ex.Message;
Microsoft.Extensions.Hosting.Testing.Tests (1)
HostingFakesExtensionsTests.cs (1)
55Assert.Equal("No fake log collector registered", exception.Message);
Microsoft.Extensions.Http.Resilience.Tests (3)
Hedging\HedgingTests.cs (2)
153Assert.Equal("The routing strategy did not provide any route URL on the first attempt.", exception.Message); 175Assert.Equal("Something went wrong!", exception.Message);
Resilience\RequestMessageSnapshotTests.cs (1)
29Assert.Equal("StreamContent content cannot by cloned.", exception.Message);
Microsoft.Extensions.Logging.EventLog (1)
WindowsEventLog.cs (1)
59$"Unable to log .NET application events. {sx.Message}");
Microsoft.Extensions.Logging.EventSource (1)
ExceptionInfo.cs (1)
23Message = exception.Message;
Microsoft.Extensions.ServiceDiscovery.Tests (4)
ServiceEndpointResolverTests.cs (4)
30Assert.Equal("No provider which supports the provided service name, 'https://basket', has been configured.", exception.Message); 41Assert.Equal("No service endpoint providers are configured.", exception.Message); 43Assert.Equal("No service endpoint providers are configured.", exception.Message); 64Assert.Equal("No provider which supports the provided service name, 'http://foo', has been configured.", exception.Message);
Microsoft.Extensions.Telemetry (3)
Logging\ExtendedLogger.cs (2)
146tags.Add(ExceptionMessage, exception.Message); 196_ = sb.AppendLine(exception.Message);
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\LogBuffering\SerializedLogRecordFactory.cs (1)
46exceptionMessage = exception.Message;
Microsoft.Extensions.Telemetry.Tests (2)
Http\HttpParserTests.cs (1)
66Assert.Equal(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage, ex.Message);
Http\HttpRouteFormatterTests.cs (1)
146Assert.Equal(TelemetryCommonExtensions.UnsupportedEnumValueExceptionMessage, ex.Message);
Microsoft.Extensions.VectorData.ConformanceTests (6)
EmbeddingGenerationTests.cs (5)
157exception.Message); 176Assert.Equal($"An input of type 'int' was provided, but an incompatible embedding generator of type '{nameof(FakeEmbeddingGenerator)}' was configured.", exception.Message); 314Assert.Equal("When an embedding generator is configured, `Include Vectors` cannot be enabled.", exception.Message); 324Assert.Equal("When an embedding generator is configured, `Include Vectors` cannot be enabled.", exception.Message); 338Assert.Equal("When an embedding generator is configured, `Include Vectors` cannot be enabled.", exception.Message);
ModelTests\MultiVectorModelTests.cs (1)
75Assert.Equal($"The '{nameof(MultiVectorRecord)}' type has multiple vector properties, please specify your chosen property via options.", exception.Message);
Microsoft.Gen.Logging.Generated.Tests (8)
LogMethodTests.cs (8)
168Assert.Equal("A", collector.LatestRecord.Exception!.Message); 174Assert.Equal("A", collector.LatestRecord.Exception!.Message); 180Assert.Equal("A", collector.LatestRecord.Exception!.Message); 186Assert.Equal("B", collector.LatestRecord.Exception!.Message); 576Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 583Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 590Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 600Assert.Equal(exception.Message, collector.LatestRecord.Exception!.Message);
Microsoft.Gen.MetadataExtractor (1)
MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.Gen.MetricsReports (1)
MetricDefinitionEmitter.cs (1)
143throw new InvalidOperationException($"An exception occurred during metric report generation {e.GetType()}:{e.Message}.");
Microsoft.JSInterop (1)
JSRuntime.cs (1)
312var message = $"An exception occurred executing JS interop: {exception.Message}. See InnerException for more details.";
Microsoft.JSInterop.WebAssembly (1)
WebAssemblyJSRuntime.cs (1)
54throw new JSException(ex.Message, ex);
Microsoft.Maui (2)
Handlers\HybridWebView\HybridWebViewHandler.cs (2)
152 var ex = new HybridWebViewInvokeJavaScriptException($"InvokeJavaScript threw an exception: {jsException.Message}", jsException); 199 MauiContext?.CreateLogger<HybridWebViewHandler>()?.LogError(ex, "An error occurred while invoking a .NET method from JavaScript: {ErrorMessage}", ex.Message);
Microsoft.Maui.Controls (3)
Xaml\TypeConversionExtensions.cs (1)
159 exception = e as XamlParseException ?? new XamlParseException($"Type converter failed: {e.Message}", serviceProvider, e);
Xaml\ValueConverterProvider.cs (1)
19 throw new XamlParseException(exception.Message, serviceProvider, exception);
XamlParseException.cs (1)
54 internal string UnformattedMessage => _unformattedMessage ?? Message;
Microsoft.Maui.Controls.Build.Tasks (2)
XamlCTask.cs (2)
317 LoggingHelper.LogError("XamlC", null, xpe.HelpLink, xamlFilePath, xpe.XmlInfo.LineNumber, xpe.XmlInfo.LinePosition, 0, 0, xpe.Message); 321 LoggingHelper.LogError("XamlC", null, e.HelpLink, xamlFilePath, 0, 0, 0, 0, e.Message);
Microsoft.Maui.Controls.SourceGen (2)
CodeBehindGenerator.cs (1)
272 context.ReportDiagnostic(Diagnostic.Create(Descriptors.XamlParserError, location, xamlItem.Exception.Message));
src\Controls\src\Core\XamlParseException.cs (1)
54 internal string UnformattedMessage => _unformattedMessage ?? Message;
Microsoft.Maui.Graphics.Text.Markdig (1)
Renderer\SimpleCssParser.cs (1)
31 System.Diagnostics.Debug.WriteLine(exc.Message);
Microsoft.Maui.Resizetizer (1)
AsyncTask.cs (1)
69 LogError(ex.Message + Environment.NewLine + ex.StackTrace);
Microsoft.ML.AutoML (8)
API\BinaryClassificationExperiment.cs (1)
462throw new OperationCanceledException(ex.Message, ex.InnerException);
API\MulticlassClassificationExperiment.cs (1)
440throw new OperationCanceledException(ex.Message, ex.InnerException);
API\RegressionExperiment.cs (1)
455throw new OperationCanceledException(ex.Message, ex.InnerException);
AutoMLExperiment\AutoMLExperiment.cs (1)
301Exception Details: {ex.Message}
AutoMLExperiment\IMonitor.cs (1)
61_logger.Trace(exception.Message + exception.StackTrace);
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
108throw new OperationCanceledException(ex.Message, ex.InnerException);
Experiment\Experiment.cs (2)
199_logger.Warning(_operationCancelledMessage, e.Message); 211_logger.Warning(_operationCancelledMessage, e.Message);
Microsoft.ML.AutoML.Tests (3)
AutoFitTests.cs (3)
664var containsMessage = lastException.Message.Contains(expectedExceptionMessage); 674if (!ex.Message.Contains(expectedExceptionMessage)) 684$"Obtained unexpected error of type {lastException.GetType()} with message: {lastException.Message}");
Microsoft.ML.Core (16)
CommandLine\CmdParser.cs (2)
987Report("Error: Can't open command line argument file '{0}' : '{1}'", fileName, e.Message); 1058Console.WriteLine("Error: Can't open command line argument file '{0}' : '{1}'", path, e.Message);
ComponentModel\AssemblyLoadingUtils.cs (1)
57Console.Error.WriteLine("Warning: Could not load '{0}': {1}", path, ex.Message);
ComponentModel\ComponentCatalog.cs (1)
1068throw Contracts.Except(e, "Unexpected exception thrown while parsing: " + e.Message);
Utilities\Contracts.cs (1)
74Contracts.Assert(false, "Format string arg mismatch: " + ex.Message);
Utilities\PathUtils.cs (1)
143throw Contracts.ExceptParam(nameof(folder), $"Failed to create folder for the provided path: {folder}. \nException: {exc.Message}");
Utilities\ResourceManagerUtils.cs (7)
145downloadResult += $"DownloadFailed with exception {ex.Message}" + @"\n"; 147ch.Warning($"{i + 1} - th try: Dowload {fileName} from {url} fail with exception {ex.Message}"); 171return (await t).Message; 186ch.Warning($"File '{filePath}' could not be deleted: {e.Message}"); 223error = $"Error trying to create directory {appDataBaseDir}: {e.Message}.\nPlease fix your " + 242error = $"Error trying to create directory {absDir}: {e.Message}.\nPlease try setting the " + 296ch.Error($"{fileName}: Could not download. HttpClient returned the following error: {e.Message}");
Utilities\Stream.cs (3)
855throw Contracts.ExceptUserArg(userArgument, exc.Message); 859throw Contracts.ExceptUserArg(userArgument, exc.Message); 863throw Contracts.ExceptUserArg(userArgument, exc.Message);
Microsoft.ML.Core.Tests (7)
UnitTests\DataTypes.cs (7)
96Assert.Equal("Value could not be parsed from text to sbyte.", ex.Message); 102Assert.Equal("Value could not be parsed from text to sbyte.", ex.Message); 136Assert.Equal("Value could not be parsed from text to short.", ex.Message); 142Assert.Equal("Value could not be parsed from text to short.", ex.Message); 176Assert.Equal("Value could not be parsed from text to int.", ex.Message); 182Assert.Equal("Value could not be parsed from text to int.", ex.Message); 222Assert.Equal("Value could not be parsed from text to long.", ex.Message);
Microsoft.ML.CpuMath (1)
src\Microsoft.ML.Core\Utilities\Contracts.cs (1)
74Contracts.Assert(false, "Format string arg mismatch: " + ex.Message);
Microsoft.ML.Data (4)
DataLoadSave\MultiFileSource.cs (1)
87throw Contracts.ExceptIO(e, "Could not open file '{0}'. Error is: {1}", path, e.Message);
DataLoadSave\Text\TextLoaderCursor.cs (1)
840"Parsing failed with an exception: {0}", state.ParsingException.Message);
Dirty\PredictionUtils.cs (1)
44errorMsg = "Unexpected exception thrown while parsing: " + e.Message;
Transforms\KeyToVector.cs (1)
267var errorMsg = e.Message + " Related column: ";
Microsoft.ML.DataView (1)
Contracts.cs (1)
26Debug.Fail("Format string arg mismatch: " + ex.Message);
Microsoft.ML.Ensemble (1)
Trainer\EnsembleTrainerBase.cs (1)
170index + 1, Trainers.Length, ex.Message);
Microsoft.ML.EntryPoints (1)
JsonUtils\ExecuteGraphCommand.cs (1)
58throw _host.Except(ex, "Failed to parse experiment graph: {0}", ex.Message);
Microsoft.ML.FastTree (1)
FastTreeRanking.cs (1)
165throw Host.Except(ex, "Error in the format of custom gains. Inner exception is {0}", ex.Message);
Microsoft.ML.Maml (3)
MAML.cs (3)
169ch.Error(e.Sensitivity(), e.Message); 248writer.WriteLine("({0}) Unexpected exception: {1}, '{2}'", index, e.Message, e.GetType()); 266ch.Error(e.Sensitivity(), "({0}) Unexpected exception: {1}, '{2}'", index, e.Message, e.GetType());
Microsoft.ML.Parquet (4)
ParquetLoader.cs (1)
737_ch.Error("Cannot convert BigInteger to RowId. Exception : '{0}'", ex.Message);
PartitionedFileLoader.cs (3)
478Ch.Warning($"Failed to load file {path} due to a loader exception. Moving on to the next file. Ex: {e.Message}"); 492Ch.Warning(MessageSensitivity.Schema, e.Message); 735Ch.Warning($"Could not parse column values from the path {path}. Ex: {e.Message}");
Microsoft.ML.Predictor.Tests (2)
CmdLine\CmdIndenterTest.cs (1)
90wrt.WriteLine("Exception: {0}", ex.Message);
CmdLine\CmdLine.cs (1)
392wrt.WriteLine("Exception: {0}", ex.Message);
Microsoft.ML.ResultProcessor (1)
ResultProcessor.cs (1)
1024Console.Error.WriteLine(e.Message);
Microsoft.ML.Samples (1)
Program.cs (1)
30Console.WriteLine($"An error occurred while running {type.Name}: {ex.Message}");
Microsoft.ML.StandardTrainers (1)
Standard\LogisticRegression\LbfgsPredictorBase.cs (1)
704ch.Warning("Premature convergence occurred. The OptimizationTolerance may be set too small. {0}", e.Message);
Microsoft.ML.Sweeper (4)
ConfigRunner.cs (1)
144throw Host.Except(e, e.Message);
Parameters.cs (3)
606error = $"Error creating sweep generator for parameter '{paramName}': {e.Message}"; 636error = $"Error creating sweep generator for parameter '{paramName}': {e.Message}"; 660error = $"Error creating sweep generator for parameter '{paramName}': {e.Message}";
Microsoft.ML.TensorFlow (3)
TensorflowUtils.cs (3)
316throw Contracts.ExceptParam(nameof(folder), $"Failed to create folder for the provided path: {folder}. \nException: {exc.Message}"); 340ch.Info("Error deleting folder. {0}. Retry,", e.Message); 385throw Contracts.ExceptParam(nameof(folder), $"Failed to create folder for the provided path: {folder}. \nException: {exc.Message}");
Microsoft.ML.TestFramework (2)
DataPipe\Parquet.cs (1)
32Assert.Equal("Nullable object must have a value.", ex.Message);
DataPipe\TestDataPipe.cs (1)
1610Assert.Equal(ex.Message, string.Format("The specified documents are all empty in column '{0}'.", colName));
Microsoft.ML.TestFrameworkCommon (2)
src\Common\tests\RetryHelper.cs (1)
60string diagnostic = $"RetryHelper: retrying {testName} {i}th time of {maxAttempts}: got {lastException.Message}";
TestCommon.cs (1)
279if (ex.Message != "Invalid call to 'GetValue'")
Microsoft.ML.Tests (25)
CachingTests.cs (1)
68Assert.Contains("Current estimator chain has no estimator, can't append cache checkpoint.", ex.Message,
DatabaseLoaderTests.cs (1)
108Assert.Contains("Timeout", ex.InnerException.Message);
ExpressionLanguageTests\ExpressionLanguageTests.cs (1)
206wrt.WriteLine("Exception: {0}", ex.Message);
OnnxConversionTest.cs (4)
2041Assert.Contains("Requested OpSet version 9 is lower than HashTransform's minimum OpSet version requirement: 11", ex.Message); 2054Assert.Contains("Requested OpSet version 13 is higher than the current most updated OpSet version 12", ex.Message); 2065Assert.Contains("Requested OpSet version 9 is lower than HashTransform's minimum OpSet version requirement: 11", ex.Message); 2076Assert.Contains("Requested OpSet version 13 is higher than the current most updated OpSet version 12", ex.Message);
OnnxSequenceTypeWithAttributesTest.cs (1)
110Assert.Equal(expectedExceptionMessage, ex.Message.Substring(0, 387));
SvmLightTests.cs (11)
247Assert.Contains("Duplicate keys found in dataset", ex.InnerException.Message); 362Assert.Contains("Encountered 0 index while parsing a 1-based dataset", ex.InnerException.Message); 381Assert.Contains("Encountered non-parsable index '-1' while parsing dataset", ex.InnerException.Message); 400Assert.Contains("Encountered non-parsable index 'a' while parsing dataset", ex.InnerException.Message); 407Assert.Contains("No int parsable keys found during key transform inference", ex.Message); 444Assert.Contains("If the number of features is not specified, a dataset must be provided to infer it.", ex.Message); 446Assert.Contains("To use the text feature names option, a dataset must be provided", ex.Message); 513Assert.Contains("Column Label not found in data", ex.Message); 521Assert.Contains("Column Features not found in data", ex.Message); 529Assert.Contains("Column Group not found in data", ex.Message); 537Assert.Contains("Column Weight not found in data", ex.Message);
TextLoaderTests.cs (4)
108Assert.Contains("Could not parse value -9223372036854775809 in line 1, column DvInt8", ex.Message); 132Assert.Contains("Could not parse value 9223372036854775808 in line 1, column DvInt8", ex.Message); 1203Assert.StartsWith("Should define at least one public, readable field or property in TInput.", ex.Message); 1214Assert.StartsWith("Should define at least one public, readable field or property in TInput.", ex.Message);
Transformers\ConcatTests.cs (1)
32Assert.Contains("Input columns not specified", ex.Message);
Transformers\KeyToVectorEstimatorTests.cs (1)
268Assert.Contains("Arithmetic operation resulted in an overflow. Related column: ProblematicColumn", ex.Message);
Microsoft.ML.Tokenizers (5)
Model\CodeGenTokenizer.cs (2)
1756throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 1796throw new IOException($"Cannot read the file Merge file.{Environment.NewLine}Error message: {e.Message}", e);
Model\EnglishRobertaTokenizer.cs (2)
188throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 228throw new IOException($"Cannot read the file Merge file.{Environment.NewLine}Error message: {e.Message}", e);
Model\TiktokenTokenizer.cs (1)
233throw new InvalidOperationException($"Failed to load from BPE vocab file stream: {ex.Message}", ex);
Microsoft.ML.Tokenizers.Data.Tests (2)
src\Common\tests\RetryHelper.cs (1)
60string diagnostic = $"RetryHelper: retrying {testName} {i}th time of {maxAttempts}: got {lastException.Message}";
TokenizerDataTests.cs (1)
32Assert.Contains(packageName, exception.Message);
Microsoft.ML.Tokenizers.Tests (1)
src\Common\tests\RetryHelper.cs (1)
60string diagnostic = $"RetryHelper: retrying {testName} {i}th time of {maxAttempts}: got {lastException.Message}";
Microsoft.NET.Build.Containers (12)
AmazonECRMessageHandler.cs (1)
26catch (HttpRequestException e) when (e.InnerException is IOException ioe && ioe.Message.Equals("The response ended prematurely.", StringComparison.OrdinalIgnoreCase))
Credentials\CredentialRetrievalException.cs (1)
12Resource.FormatString(nameof(Strings.FailedRetrievingCredentials), registry, innerException.Message),
FallbackToHttpMessageHandler.cs (1)
68_logger.LogInformation(ex, "Fall back to http for {uri} failed with message \"{message}\".", uri, ex.Message);
ImagePublisher.cs (1)
168Log.LogErrorWithCodeFromResources(nameof(Strings.RegistryOutputPushFailed), e.Message);
LocalDaemons\ContainerRuntime.cs (1)
120_logger.LogInformation(Strings.LocalDocker_FailedToGetConfig, ex.Message);
LocalDaemons\ContainerRuntimeOperations.cs (1)
132ex.Message);
LocalDaemons\ContainerRuntimes.cs (1)
165throw new DockerLoadException(Resource.FormatString(nameof(Strings.DockerInfoFailed_Ex), e.Message));
LocalDaemons\DockerCli.cs (2)
182_logger.LogInformation(Strings.LocalDocker_FailedToGetConfig, ex.Message); 228throw new DockerLoadException(Resource.FormatString(nameof(Strings.DockerInfoFailed_Ex), e.Message));
Registry\Registry.cs (1)
438localPath, exception.Message);
src\sdk\src\Common\VSHostObject.cs (1)
95_log.LogMessage(MessageImportance.Low, "Exception trying to call QueryAllTaskItems: {0}", ex.Message);
VSHostObject.cs (1)
87_log.LogMessage(MessageImportance.Low, "Exception trying to call QueryAllTaskItems: {0}", ex.Message);
Microsoft.NET.Build.Extensions.Tasks (2)
GetDependsOnNETStandard.cs (1)
64Log.LogWarning(Strings.GetDependsOnNETStandardFailedWithException, e.Message, referenceSourcePath);
src\sdk\src\Tasks\Common\TaskBase.cs (1)
40Log.LogError(e.Message);
Microsoft.NET.Build.Tasks (5)
CreateAppHost.cs (3)
120string message = ex.Message; 123message = ex.InnerException.Message; 145throw new BuildErrorException(Strings.AppHostSigningFailed, ex.Message, ex.ExitCode.ToString());
LockFileCache.cs (1)
87string.Format(Strings.ErrorReadingAssetsFile, ex.Message),
src\sdk\src\Tasks\Common\TaskBase.cs (1)
40Log.LogError(e.Message);
Microsoft.NET.Sdk.Publish.Tasks (14)
MsDeploy\CommonUtility.cs (5)
1551StringBuilder strBuilder = new(e.Message.Length * 4); 1671strBuilder.Append(e.Message); 1681strBuilder.Append(currentException.Message); 1684Log.LogError(string.Format(CultureInfo.CurrentCulture, Resources.VSMSDEPLOY_FailedWithExceptionWithDetail, e.Message, strBuilder.ToString())); 1843task.Log.LogMessage(Framework.MessageImportance.Low, string.Format(CultureInfo.CurrentCulture, Resources.BUILDTASK_FailedToLoadThisVersionMsDeployTryingTheNext, versionArray[i], e.Message));
src\sdk\src\Common\VSHostObject.cs (1)
95_log.LogMessage(MessageImportance.Low, "Exception trying to call QueryAllTaskItems: {0}", ex.Message);
Tasks\Kudu\KuduDeploy.cs (1)
177Log.LogError(string.Format(Resources.KUDUDEPLOY_AzurePublishErrorReason, e.Message));
Tasks\MsDeploy\VsMsdeploy.cs (2)
883Log.LogError(string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.VSMSDEPLOY_FailedWithException, e.Message)); 1084Diagnostics.Debug.Fail("Exception on ICancelableTask.Cancel being invoked:" + ex.Message);
Tasks\Xdt\TaskTransformationLogger.cs (2)
152string message = ex.Message; 162sb.AppendFormat("{0} : {1}", exIterator.GetType().Name, exIterator.Message);
Tasks\Xdt\TransformXml.cs (3)
194string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.BUILDTASK_TransformXml_DestinationWriteFailed, ex.Message), 218string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.BUILDTASK_TransformXml_SourceLoadFailed, ex.Message), 236string.Format(System.Globalization.CultureInfo.CurrentCulture, Resources.BUILDTASK_TransformXml_TransformLoadFailed, ex.Message),
Microsoft.NET.Sdk.Razor.Tasks (2)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerLogger.cs (2)
79Log("Exception '{0}' occurred during '{1}'. Stack trace:\r\n{2}", e.Message, reason, e.StackTrace); 86Log("Inner exception[{0}] '{1}'. Stack trace: \r\n{1}", innerExceptionLevel, e.Message, e.StackTrace);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (2)
ComputeStaticWebAssetsTargetPaths.cs (1)
58Log.LogError(ex.Message);
ReadPackageAssetsManifest.cs (1)
167Log.LogError("Failed to read package manifest '{0}': {1}", manifestPath, ex.Message);
Microsoft.Private.Windows.Core (12)
_generated\119\Windows.Win32.HRESULT.g.cs (1)
87 return string.Format("{0} {1}", ToString(), new global::System.ComponentModel.Win32Exception((int)this.Value).Message);
System\ExceptionExtensions.cs (1)
44: new SerializationException(ex.Message, ex);
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (2)
656new BinaryObjectString(3, exception.Message), 803Debug.WriteLine($"Failed to binary format: {ex.Message}");
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
51Debug.Fail(ex.Message);
System\Private\Windows\Ole\BinaryFormatUtilities.cs (1)
52Debug.Fail($"Unexpected exception writing binary formatted data. {ex.Message}");
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
389Debug.Assert(e is NotSupportedException, e.Message);
System\TypeExtensions.cs (1)
280Debug.Fail(e.Message);
Windows\Win32\PInvokeCore.GetWindowText.cs (2)
31Debug.Fail($"GetWindowTextLength failed. Error: {new Win32Exception(error).Message}"); 50Debug.Fail($"GetWindowText failed. Error: {new Win32Exception().Message}");
Windows\Win32\System\Com\ComHelpers.cs (2)
113Debug.WriteLine($"Did not find IUnknown for {@object.GetType().Name}. {ex.Message}"); 229Debug.WriteLine($"{nameof(TryGetObjectForIUnknown)}: Failed to get object for {typeof(TObject).Name}. {ex.Message}");
Microsoft.SourceLink.AzureDevOpsServer.Git (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.AzureRepos.Git (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.Bitbucket.Git (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.Common (1)
GenerateSourceLinkFile.cs (1)
160Log.LogError(Resources.ErrorWritingToSourceLinkFile, OutputFile, e.Message);
Microsoft.SourceLink.Gitea (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.Gitee (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.GitHub (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.GitLab (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.SourceLink.GitWeb (2)
src\sourcelink\src\Common\GitProvider\TranslateRepositoryUrlGitTask.cs (2)
81Log.LogError(e.Message); 101Log.LogError(e.Message);
Microsoft.TemplateEngine.Cli (10)
CliConsoleFormatter.cs (1)
106textWriter.WriteLine($"Details: {logEntry.Exception.Message}");
Commands\BaseCommand.cs (2)
265Reporter.Error.WriteLine(ex.Message.Bold().Red()); 278Reporter.Error.WriteLine(ex.Message.Bold().Red());
PostActionProcessors\ProcessStartPostActionProcessor.cs (1)
89Reporter.Error.WriteLine(ex.Message);
TemplateInvoker.cs (6)
69Reporter.Error.WriteLine(cx.Message.Bold().Red()); 72Reporter.Error.WriteLine(cx.InnerException.Message.Bold().Red()); 80Reporter.Error.WriteLine(ex.Message.Bold().Red()); 181Reporter.Error.WriteLine(cx.Message.Bold().Red()); 184Reporter.Error.WriteLine(cx.InnerException.Message.Bold().Red()); 191Reporter.Error.WriteLine(tae.Message.Bold().Red());
Microsoft.TemplateEngine.Core (3)
Expressions\Shared\SharedEvaluatorDefinition.cs (2)
185? e.Message 186: (faultedMessage + Environment.NewLine + e.Message);
Util\Orchestrator.cs (1)
292throw new TemplateAuthoringException($"Template authoring error encountered while processing file {sourceFile.FullPath}: {ex.Message}", ex.ConfigItem, ex);
Microsoft.TemplateEngine.Edge (13)
BuiltInManagedProvider\GlobalSettings.cs (1)
219e.Message);
Constraints\ConstraintBase.cs (1)
33return TemplateConstraintResult.CreateEvaluationFailure(this, ce.Message, LocalizableStrings.Generic_Constraint_WrongConfigurationCTA);
Installers\NuGet\NuGetInstaller.cs (3)
182string.Format(LocalizableStrings.NuGetInstaller_InstallResult_Error_UpdateCheckGeneric, package.DisplayName, e.Message), 318string.Format(LocalizableStrings.NuGetInstaller_InstallResult_Error_InstallGeneric, installRequest.DisplayName, e.Message), 357string.Format(LocalizableStrings.NuGetInstaller_InstallResult_Error_UninstallGeneric, templatePackage.DisplayName, e.Message)));
Settings\TemplatePackageManager.cs (3)
110_logger.LogError(LocalizableStrings.TemplatePackageManager_Error_FailedToGetTemplatePackages, source.Key.Factory.DisplayName, ex.Message); 362_logger.LogWarning(LocalizableStrings.TemplatePackageManager_Error_FailedToScan, allTemplatePackages[index].MountPointUri, ex.Message); 380_logger.LogWarning(LocalizableStrings.TemplatePackageManager_Error_FailedToStoreCache, ex.Message);
Template\TemplateCreator.cs (1)
258yield return e.Message;
TemplateConstraintManager.cs (4)
124return TemplateConstraintResult.CreateInitializationFailure(type, string.Format(LocalizableStrings.TemplateConstraintManager_Error_FailedToInitialize, type, exception?.Message)); 134return TemplateConstraintResult.CreateEvaluationFailure(task.Result, string.Format(LocalizableStrings.TemplateConstraintManager_Error_FailedToEvaluate, type, args, e.Message)); 199constraintResults.Add(TemplateConstraintResult.CreateInitializationFailure(constraint.Type, string.Format(LocalizableStrings.TemplateConstraintManager_Error_FailedToInitialize, constraint.Type, exception?.Message))); 210constraintResults.Add(TemplateConstraintResult.CreateEvaluationFailure(_templateConstrains[constraint.Type].Result, string.Format(LocalizableStrings.TemplateConstraintManager_Error_FailedToEvaluate, constraint.Type, constraint.Args, e.Message)));
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (8)
ConfigModel\SymbolModelConverter.cs (1)
30logger?.LogWarning(ex.Message);
DirectoryBasedTemplate.cs (1)
118Logger.LogError("Failed to validate template: {ex}", ex.Message);
RunnableProjectGenerator.cs (6)
79settings.Host.Logger.LogError(LocalizableStrings.Authoring_TemplateNotInstalled_Message, configFile?.GetDisplayPath(), ex.Message); 84settings.Host.Logger.LogError(LocalizableStrings.Authoring_TemplateNotInstalled_Message, configFile?.GetDisplayPath(), ex.Message); 278logger.LogError(LocalizableStrings.Authoring_TemplateNotInstalled_Message, templateFileConfig.GetDisplayPath(), ex.Message); 283logger.LogError(LocalizableStrings.Authoring_TemplateNotInstalled_Message, templateFileConfig.GetDisplayPath(), ex.Message); 354logger.LogError(LocalizableStrings.Authoring_TemplateNotInstalled_Message, file.GetDisplayPath(), ex.Message); 359logger.LogError(LocalizableStrings.Authoring_TemplateNotInstalled_Message, file.GetDisplayPath(), ex.Message);
Microsoft.TemplateSearch.Common (1)
TemplateSearchCoordinator.cs (1)
71results.Add(new SearchResult(provider, false, ex.Message));
Microsoft.TestPlatform.CommunicationUtilities (7)
_generated\92\TestPlatformJsonContext.Exception.g.cs (2)
141Getter = static obj => ((global::System.Exception)obj).Message, 236writer.WriteString(PropName_Message, ((global::System.Exception)value).Message);
Json\Jsonite\Jsonite.cs (1)
1407return $"({Line + 1},{Column + 1}) : error : {Message}{innerMessage}";
Serialization\ExceptionConverter.cs (3)
79writer.WriteString("Message", value.Message); 130if (!string.IsNullOrEmpty(Message)) 132sb.Append(": ").Append(Message);
TestRequestSender.cs (1)
762return exception?.Message;
Microsoft.TestPlatform.CoreUtilities (4)
Tracing\EqtTrace.cs (4)
742exceptionToTrace.Message, 754exceptionToTrace.GetBaseException().Message)); 772inner.Message, 783inner.GetBaseException().Message));
Microsoft.TestPlatform.CrossPlatEngine (6)
Client\ProxyExecutionManager.cs (1)
259var errorMessage = exception is TestPlatformException ? exception.Message : exception.ToString();
Client\TestLoggerManager.cs (1)
674throw new InvalidLoggerException($"Error while initializing logger: {loggerUri}, Exception details: {ex.Message}");
Discovery\DiscovererEnumerator.cs (2)
262e.Message); 280var mesage = string.Format(CultureInfo.CurrentCulture, CrossPlatEngineResources.DiscovererInstantiationException, e.Message);
Execution\BaseRunTests.cs (2)
231exception = new Exception(realException.Message, realException); 535? string.Format(CultureInfo.CurrentCulture, CrossPlatEngineResources.AccessDenied, e.Message)
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
BlameCollector.cs (1)
658_logger.LogWarning(args.Context, string.Format(CultureInfo.CurrentCulture, Resources.Resources.ProcDumpCouldNotStart, e.Message));
Microsoft.TestPlatform.Filter.Source (1)
FilterExpressionWrapper.cs (1)
91ParseError = ex.Message;
Microsoft.TestPlatform.PlatformAbstractions (1)
common\Tracing\PlatformEqtTrace.cs (1)
419return e.Message;
Microsoft.TestPlatform.TestHostRuntimeProvider (1)
Hosting\DotnetTestHostManager.cs (1)
813EqtTrace.Verbose($"DotnetTestHostManager.GetExecutableArchitecture: Failed to read architecture from '{executablePath}': {ex.Message}");
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (3)
VsTestConsoleProcessManager.cs (1)
231EqtTrace.Info("VsTestCommandLineWrapper: Error While Terminating Process {0} ", ex.Message);
VsTestConsoleRequestSender.cs (2)
1060ackPayload.ErrorMessage = ex.Message; 1134ackPayload.ErrorMessage = ex.Message;
Microsoft.VisualBasic.Core (7)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (1)
599Debug.Assert(False, ex.Message)
Microsoft\VisualBasic\CompilerServices\VB6BinaryFile.vb (1)
197Throw New NullReferenceException(JustNeedTheMessage.Message, New IO.IOException(SR.FileOpenedNoRead))
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
2714Throw New NullReferenceException(JustNeedTheMessage.Message, New IO.IOException(SR.FileOpenedNoRead))
Microsoft\VisualBasic\ErrObject.vb (1)
130Me.Description = FilterDefaultMessage(m_curException.Message)
Microsoft\VisualBasic\FileIO\FileSystem.vb (3)
1026Exceptions.Add(SourceDirectoryNode.Path, ex.Message) 1046Exceptions.Add(SubFilePath, ex.Message) 1066Exceptions.Add(SourceDirectoryNode.Path, ex.Message)
Microsoft.VisualStudio.TestPlatform.Common (9)
DataCollection\DataCollectionAttachmentManager.cs (1)
128string accessDeniedMessage = string.Format(CultureInfo.CurrentCulture, Resources.Resources.AccessDenied, accessException.Message);
DataCollection\TestPlatformDataCollectionLogger.cs (2)
80exception.Message, 89exception.Message,
RunSettings.cs (3)
119e.Message), 164e.Message), 207e.Message),
src\vstest\src\Microsoft.TestPlatform.Filter.Source\FilterExpressionWrapper.cs (1)
91ParseError = ex.Message;
Utilities\ExceptionUtilities.cs (2)
26var exceptionString = new StringBuilder(exception.Message); 34.Append(Resources.Resources.InnerException).Append(' ').AppendLine(inner.Message);
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (1)
HtmlLogger.cs (1)
333ConsoleOutput.Instance.Error(false, HtmlResource.HtmlLoggerError, ex.Message);
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
TrxLogger.cs (1)
504ConsoleOutput.Instance.Error(false, string.Format(CultureInfo.CurrentCulture, TrxLoggerResources.TrxLoggerWriteFailed, trxFileName, ex.Message));
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
TestObject.cs (2)
286throw new FormatException(e.Message, e); 333throw new FormatException(e.Message, e);
Microsoft.Web.XmlTransform (1)
XmlNodeException.cs (1)
31: base(innerException.Message, innerException) {
MSBuild (36)
CommandLine\CommandLineSwitchException.cs (2)
71return base.Message; 75return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidSwitchIndicator", commandLineArg);
InitializationException.cs (3)
77return base.Message; 81return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidSwitchIndicator", invalidSwitch); 155errorMessage = MessageFormatter.Format(errorMessage, e?.Message ?? string.Empty);
src\msbuild\src\Shared\Debugging\PrintLineDebuggerWriters.cs (1)
33File.AppendAllText(errorFile, $"{SimpleFormat(id, callsite, args)}\n{e.Message}\n{e.StackTrace}");
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
508CommunicationsUtilities.Trace($"Client connection failed but we will wait for another connection. Exception: {e.Message}");
src\msbuild\src\Shared\ResourceUtilities.cs (2)
311InternalError.Throw(e.Message); 318InternalError.Throw(e.Message);
XMake.cs (27)
1210Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ConfigurationFailurePrefixNoErrorCode", e.ErrorCode, e.Message)); 1228Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("LoggerFailurePrefixNoErrorCode", e.ErrorCode, e.Message)); 1234Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("LoggerFailurePrefixWithErrorCode", e.Message)); 1253Console.WriteLine($"MSBUILD : error {e.ErrorCode}: {e.Message}"); 1266$"MSBUILD : error {e.ErrorCode}: {e.Message}{(e.InnerException != null ? $" {e.InnerException.Message}" : "")}"); 1279Console.WriteLine($"MSBUILD : error {pce?.ErrorCode ?? exppce?.ErrorCode}: {e.Message}"); 1300$"MSBUILD : error {e.ErrorCode}: {e.Message}{(e.InnerException != null ? $" {e.InnerException.Message}" : string.Empty)}"); 1308$"{e.Message}{(e.InnerException != null ? $" {e.InnerException.Message}" : string.Empty)}"); 3143CommunicationsUtilities.Trace($"Invalid node packet version value '{parameters[parameters.Length - 1]}': {ex.Message}"); 3148CommunicationsUtilities.Trace($"Node packet version value '{parameters[parameters.Length - 1]}' out of range: {ex.Message}"); 3190CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3217CommandLineSwitchException.Throw("InvalidPreprocessPath", parameters[parameters.Length - 1], ex.Message); 3236CommandLineSwitchException.Throw("TargetsCouldNotBePrinted", parameters[parameters.Length - 1], ex.Message); 3299CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3348ex.Message); 3353ex.Message); 3501CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 3505CommandLineSwitchException.Throw("InvalidMaxCPUCountValue", parameters[parameters.Length - 1], ex.Message); 4179throw new LoggerException(e.Message, e); 4459InitializationException.Throw("XMake.LoggerCreationError", unquotedParameter, e, false, [loggerDescription.Name, (e == null) ? String.Empty : e.Message]); 4467InitializationException.Throw("XMake.LoggerCreationError", unquotedParameter, e, false, [loggerDescription.Name, (e == null) ? String.Empty : e.Message]); 4475InitializationException.Throw("XMake.LoggerCreationError", unquotedParameter, e, false, [loggerDescription.Name, (e == null) ? String.Empty : e.Message]); 4483Console.WriteLine(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("OptionalLoggerCreationMessage", loggerDescription.Name, e.Message)); 4567var message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidLogFileFormat", ex.Message);
MSBuild.Coordinator (1)
CoordinatorServer.cs (1)
248_output.WriteLine($"CoordinatorServer: Exception handling client: {ex.Message}");
NuGet.Build.Tasks (1)
StaticGraphRestoreTaskBase.cs (1)
166Log.LogErrorFromResources(nameof(Strings.Error_StaticGraphRestoreFailedToStart), e.Message);
NuGet.Build.Tasks.Console (3)
MSBuildStaticGraphRestore.cs (1)
912var message = string.Format(CultureInfo.CurrentCulture, Strings.Error_ReadingProjectInformation, projectName ?? Path.GetFileNameWithoutExtension(projectPath), innerException.Message);
Program.cs (2)
269LogError(errorWriter, Strings.Error_StaticGraphRestoreArgumentsParsingFailedExceptionReadingStream, e.Message, e.ToString()); 297LogError(errorWriter, Strings.Error_StaticGraphRestoreArgumentsParsingFailedExceptionReadingStream, e.Message, e.ToString());
NuGet.Build.Tasks.Pack (1)
PackTaskLogic.cs (1)
289request.PackageLicenseExpression, e.Message),
NuGet.CommandLine.XPlat (10)
Commands\ConfigCommands\ConfigRunners.cs (4)
35getLogger().LogError(e.Message); 63getLogger().LogError(e.Message); 108getLogger().LogError(e.Message); 130getLogger().LogError(e.Message);
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (1)
137projectModel.AddProjectInformation(ProblemType.Error, ex.Message);
Commands\PackageSearch\PackageSearchRunner.cs (3)
107packageSearchResultRenderer.Add(source, new PackageSearchProblem(PackageSearchProblemType.Error, ex.Message)); 113packageSearchResultRenderer.Add(source, new PackageSearchProblem(PackageSearchProblemType.Error, ex.Message)); 120packageSearchResultRenderer.Add(source, new PackageSearchProblem(PackageSearchProblemType.Error, ex.Message));
Commands\Signing\TrustedSignersCommand.cs (2)
244if (e.Message == error_TrustedSignerAlreadyExistsMessage) 255if (e.Message == error_TrustedRepoAlreadyExists)
NuGet.Commands (9)
ClientCertificatesCommand\ListClientCertRunner.cs (1)
93builder.AppendFormat(CultureInfo.CurrentCulture, Strings.ClientCertificatesItemCertificateError, defaultIndentation, e.GetBaseException().Message);
RestoreCommand\ProjectRestoreCommand.cs (2)
202e.Message))); 437if (!string.IsNullOrEmpty(e.Message))
RestoreCommand\SourceRepositoryDependencyProvider.cs (1)
696await logger.LogAsync(RestoreLogMessage.CreateWarning(NuGetLogCode.NU1801, e.Message));
RestoreCommand\Utility\AuditUtility.cs (1)
251var messageText = string.Format(Strings.Error_VulnerabilityDataFetch, exception.Message);
RestoreCommand\Utility\BuildAssetsUtils.cs (1)
419log.LogDebug($"Failed to open imports file: {path} Error: {ex.Message}");
RestoreCommand\Utility\MSBuildRestoreUtility.cs (1)
115spec = CreateErrorSpecFromItems(projectItems, e.Message, additionalMessages);
RestoreCommand\Utility\NoOpRestoreUtilities.cs (1)
162metadataFile, ex.Message)));
RestoreCommand\Utility\SpecValidationUtility.cs (1)
80ex.Message,
NuGet.Common (5)
ExceptionUtilities.cs (5)
163return new[] { exception.Message }; 172if (current.Message != null && 173current.Message != previous) // Ignore duplicate adjacent messages. 175previous = current.Message; 176yield return current.Message;
NuGet.Configuration (3)
Settings\SettingsFile.cs (3)
226string.Format(CultureInfo.CurrentCulture, Resources.ShowError_ConfigInvalidOperation, ConfigFilePath, e.Message), e); 232string.Format(CultureInfo.CurrentCulture, Resources.ShowError_ConfigUnauthorizedAccess, ConfigFilePath, e.Message), e); 244string.Format(CultureInfo.CurrentCulture, Resources.Unknown_Config_Exception, ConfigFilePath, e.Message), e);
NuGet.PackageManagement (22)
Audit\AuditChecker.cs (1)
77var messageText = string.Format(Strings.Error_VulnerabilityDataFetch, exception.Message);
FileModifiers\XdtTransformer.cs (1)
139Strings.XdtError + " " + exception.Message,
IDE\PackageRestoreManager.cs (2)
544if (!string.IsNullOrEmpty(exception.Message)) 546nuGetProjectContext.Log(MessageLevel.Error, exception.Message);
NuGetPackageManager.cs (4)
1323if (string.IsNullOrEmpty(ex.Message)) 1327throw new InvalidOperationException(ex.Message, ex); 2013if (string.IsNullOrEmpty(ex.Message)) 2017throw new InvalidOperationException(ex.Message, ex);
Projects\FolderNuGetProject.cs (2)
602nuGetProjectContext.Log(MessageLevel.Warning, ex.Message); 622nuGetProjectContext.Log(MessageLevel.Warning, ex.Message);
Projects\PackagesConfigNuGetProject.cs (4)
178ex.Message)); 232ex.Message)); 303ex.Message)); 344ex.Message));
Projects\ProjectJsonNuGetProject.cs (2)
324string.Format(CultureInfo.CurrentCulture, Strings.ErrorLoadingPackagesConfig, _jsonConfig.FullName, ex.Message), ex); 343string.Format(CultureInfo.CurrentCulture, Strings.ErrorLoadingPackagesConfig, _jsonConfig.FullName, ex.Message), ex);
Utility\FileSystemUtility.cs (1)
515nuGetProjectContext.Log(MessageLevel.Warning, e.Message);
Utility\MSBuildNuGetProjectSystemUtility.cs (5)
320projectSystem.NuGetProjectContext.Log(MessageLevel.Warning, e.Message); 339projectSystem.NuGetProjectContext.Log(MessageLevel.Warning, e.Message); 368projectSystem.NuGetProjectContext.Log(MessageLevel.Warning, e.Message); 415projectSystem.NuGetProjectContext.Log(MessageLevel.Warning, e.Message); 486nuGetProjectContext.Log(MessageLevel.Warning, e.Message);
NuGet.Packaging (15)
Exceptions\MinClientVersionException.cs (1)
21return LogMessage.CreateError(NuGetLogCode.NU1401, Message);
Exceptions\UnsafePackageEntryException.cs (1)
18return LogMessage.CreateError(NuGetLogCode.NU1402, Message);
Licenses\NuGetLicenseExpressionParser.cs (1)
147throw new NuGetLicenseExpressionParsingException(e.Message, e);
NuGetExtractionFileIO.cs (1)
62throw new Exception($"Error trying to create file {path}: {exception.Message}", exception);
NupkgMetadata\NupkgMetadataFileFormat.cs (1)
67path, ex.Message));
NuspecReader.cs (1)
513errors.Add(e.Message);
PackageCreation\Authoring\ManifestReader.cs (1)
226throw new PackagingException(NuGetLogCode.NU5032, e.Message);
PackageExtractor.cs (4)
540ex.Message)); 564ex.Message)); 764ex.Message)); 868ex.Message));
PackagesConfigWriter.cs (1)
583ex.Message),
Signing\Utility\CertificateUtility.cs (2)
528return [exception.Message]; 577return [exception.Message];
Signing\Verification\PackageSignatureVerifier.cs (1)
64SignatureLog.Issue(!settings.AllowIllegal, e.Code, e.Message),
NuGet.ProjectModel (7)
CacheFileFormat.cs (1)
68path, ex.Message));
FileFormatException.cs (4)
67exception.Message); 81exception.Message); 93exception.Message); 123exception.Message);
LockFile\LockFileFormat.cs (1)
168path, ex.Message));
ProjectLockFile\PackagesLockFileFormat.cs (1)
84path, ex.Message));
NuGet.Protocol (14)
LegacyFeed\V2FeedParser.cs (1)
573ex.Message);
LocalRepositories\LocalDownloadResource.cs (1)
81throw new FatalProtocolException(ex.Message, ex.InnerException ?? ex);
Model\PackageSearchMetadata.cs (1)
258errors.Add(e.Message);
Plugins\InboundRequestContext.cs (1)
187new Fault(exception.Message));
Plugins\PluginFactory.cs (1)
280string.Format(CultureInfo.CurrentCulture, Strings.Plugin_Exception, plugin.Name, ex.Message));
Plugins\PluginManager.cs (1)
289e.Message),
Resources\PackageUpdateResource.cs (1)
953if (ex.Message.Contains("Response status code does not indicate success: 403 (Forbidden).", StringComparison.OrdinalIgnoreCase))
Resources\VulnerabilityInfoResourceV3.cs (2)
61throw new FatalProtocolException(message: ex.Message, innerException: ex); 116throw new FatalProtocolException(message: ex.Message, innerException: ex);
Utility\LocalFolderUtility.cs (5)
1151log.LogWarning(e.Message); 1171log.LogWarning(e.Message); 1194log.LogWarning(e.Message); 1237ex.Message); 1278log.LogDebug(e.Message);
Pipelines.AppHost (1)
AppHost.cs (1)
221$"Error assigning role: {ex.Message}",
PresentationBuildTasks (15)
Microsoft\Build\Tasks\Windows\FileClassifier.cs (1)
109errorId = Log.ExtractMessageCode(e.Message, out message);
Microsoft\Build\Tasks\Windows\MarkupCompilePass1.cs (1)
182errorId = Log.ExtractMessageCode(e.Message, out message);
Microsoft\Build\Tasks\Windows\MarkupCompilePass2.cs (1)
136errorId = Log.ExtractMessageCode(e.Message, out message);
Microsoft\Build\Tasks\Windows\ResourcesGenerator.cs (1)
203string errorId = Log.ExtractMessageCode(e.Message, out message);
Microsoft\Build\Tasks\Windows\UidManager.cs (1)
104errorId = Log.ExtractMessageCode(e.Message, out message);
MS\Internal\Tasks\TaskHelper.cs (4)
193string message = e.Message; 199if (!e.Message.Contains(eInner.Message, StringComparison.Ordinal)) 205message += eInner.Message;
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\BamlRecordWriter.cs (1)
90_xamlTypeMapper.ThrowExceptionWithLine(e.Message, e.InnerException);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParseException.cs (3)
420if (innerException != null && innerException.Message != null) 423if (innerException.Message != String.Empty) 428sb.Append(innerException.Message);
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlParser.cs (1)
232newMessage = $"{e.Message} {SR.Format(SR.ParserLineAndOffset,
src\wpf\src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (1)
419RethrowAsParseException(e.Message, LineNumber, LinePosition, e);
PresentationCore (4)
MS\Internal\FontFace\CompositeFontParser.cs (2)
201Fail(x.Message, x); 893x.Message),
MS\Internal\TextFormatting\FullTextLine.cs (1)
426new object[] { caughtException.Message, caughtException }
System\Windows\Nrbf\SerializationRecordExtensions.cs (1)
25Debug.Fail(ex.Message);
PresentationFramework (24)
MS\Internal\DataStreams.cs (2)
131Debug.Fail($"Unexpected exception writing binary formatted data. {ex.Message}"); 260Debug.Fail($"Unexpected exception reading binary formatted data. {ex.Message}");
MS\Internal\IO\Packaging\XpsFilter.cs (4)
423throw new COMException(ex.Message, (int)FilterErrorCode.FILTER_E_ACCESS); 427throw new COMException(ex.Message, (int)FilterErrorCode.FILTER_E_UNKNOWNFORMAT); 552throw new COMException(ex.Message, (int)FilterErrorCode.FILTER_E_ACCESS); 556throw new COMException(ex.Message, (int)FilterErrorCode.FILTER_E_UNKNOWNFORMAT);
MS\Internal\PtsHost\Pts.cs (2)
99string message = (innerException == null) ? String.Empty : innerException.Message; 281get { return InnerException.Message; }
MS\Internal\TraceData.cs (1)
292return $"{ex.GetType().Name} ({AvTrace.AntiFormat(ex.Message)})";
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (2)
179string message = ex.Message; 363string message = innerException.Message ?? messageResource;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (1)
60string desc = _exception.Message;
System\Windows\Controls\DataErrorValidationRule.cs (1)
93ex.Message),
System\Windows\Controls\Primitives\Popup.cs (1)
1863throw new NullReferenceException(nre.Message, SavedException);
System\Windows\Data\BindingExpression.cs (1)
2191validationError = new ValidationError(exceptionValidationRule, this, ex.Message, ex);
System\Windows\Data\BindingGroup.cs (3)
979AddValidationError(new ValidationError(rule, this, vue.Message, vue)); 1214AddValidationError(new ValidationError(rule, this, vue.Message, vue)); 1242ValidationError error = new ValidationError(ExceptionValidationRule.Instance, this, ex.Message, ex);
System\Windows\Markup\BamlRecordWriter.cs (1)
90_xamlTypeMapper.ThrowExceptionWithLine(e.Message, e.InnerException);
System\Windows\Markup\XamlParseException.cs (3)
420if (innerException != null && innerException.Message != null) 423if (innerException.Message != String.Empty) 428sb.Append(innerException.Message);
System\Windows\Markup\XamlReader.cs (2)
539return new XamlParseException(e.Message, lineInfo.LineNumber, lineInfo.LinePosition, baseUri, baseException); 543return new XamlParseException(e.Message, baseException);
PresentationUI (2)
MS\Internal\Documents\DocumentSignatureManager.cs (1)
607e.Message),
MS\Internal\Documents\RightsManagementProvider.cs (1)
247rmException.Message);
ReachFramework (8)
PrintConfig\PrintSchema.cs (4)
2434errMsg = e.Message; 2439errMsg = e.Message; 2469errMsg = e.Message; 2474errMsg = e.Message;
PrintConfig\PrtCap_Public_Simple.cs (1)
193/// well-formed XML PrintCapabilities. The exception object's <see cref="Exception.Message"/> property describes
PrintConfig\PrtCap_Public.cs (1)
39/// The exception object's <see cref="Exception.Message"/> property describes why the XML is not well-formed. And if not
PrintConfig\PrtTicket_Public_Simple.cs (1)
262/// well-formed XML PrintTicket. The exception object's <see cref="Exception.Message"/> property describes
PrintConfig\PrtTicket_Public.cs (1)
58/// The exception object's <see cref="Exception.Message"/> property describes why the XML is not well-formed.
RepoTasks (14)
src\aspnetcore\src\Shared\CertificateGeneration\MacOSCertificateManager.cs (3)
146Log.MacOSAddCertificateToUserProfileDirError(candidate.Thumbprint, ex.Message); 323Log.MacOSAddCertificateToUserProfileDirError(certificate.Thumbprint, ex.Message); 464Log.MacOSRemoveCertificateFromUserProfileDirError(certificate.Thumbprint, ex.Message);
src\aspnetcore\src\Shared\CertificateGeneration\UnixCertificateManager.cs (11)
229Log.UnixDotnetTrustException(ex.Message); 434Log.WslWindowsTrustException(ex.Message); 459Log.UnixDotnetUntrustException(ex.Message); 722Log.UnixNssDbCheckException(nssDb.Path, ex.Message); 750Log.UnixNssDbAdditionException(nssDb.Path, ex.Message); 779Log.UnixNssDbRemovalException(nssDb.Path, ex.Message); 799Log.UnixFirefoxProfileEnumerationException(firefoxDirectory, ex.Message); 825Log.UnixCertificateFileDeletionException(certPath, ex.Message); 959Log.UnixOpenSslVersionException(ex.Message); 994Log.UnixOpenSslHashException(certificatePath, ex.Message); 1069Log.UnixOpenSslRehashException(ex.Message);
Roslyn.Diagnostics.Analyzers (12)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (9)
265throw new IOException(e.Message, e); 269throw new IOException(e.Message, e); 309throw new IOException(e.Message, e); 333throw new IOException(e.Message, e); 350throw new IOException(e.Message, e); 392throw new IOException(e.Message, e); 410throw new IOException(e.Message, e); 429throw new IOException(e.Message, e); 454throw new IOException(e.Message, e);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs (1)
262error = ex.Message;
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FailFast.cs (1)
76Console.WriteLine(current.Message);
src\roslyn\src\Dependencies\Contracts\ErrorReporting\FatalError.cs (1)
25: base(innerException.Message, innerException)
rzc (6)
Application.cs (3)
60Error.WriteLine(innerException.Message); 69Error.WriteLine(ex.Message); 80Error.WriteLine(ex.Message);
ServerCommand.cs (1)
69Error.Write($"Server mutex creation failed. {ex.Message}");
ServerProtocol\ServerLogger.cs (2)
79Log("Exception '{0}' occurred during '{1}'. Stack trace:\r\n{2}", e.Message, reason, e.StackTrace); 86Log("Inner exception[{0}] '{1}'. Stack trace: \r\n{1}", innerExceptionLevel, e.Message, e.StackTrace);
ScenarioTests.Common.Tests (1)
ScenarioTestHelpers.cs (1)
143Logger.LogInformation(" {0}", ex.Message);
sdk-tasks (5)
CopyPreservingRelativeSymlinks.cs (1)
72Log.LogError($"Failed to copy '{sourcePath}' to '{destPath}': {ex.Message}");
DeduplicateAssembliesWithLinks.cs (2)
88Log.LogError($"Failed to hash file '{filePath}': {ex.Message}"); 122Log.LogError($"Failed to create {LinkType} from '{duplicate.Path}' to '{primary.Path}': {ex.Message}");
FilterItemsByDuplicateHash.cs (2)
47Log.LogWarning($"Failed to hash reference file '{item.ItemSpec}': {ex.Message}"); 67Log.LogWarning($"Failed to hash candidate file '{item.ItemSpec}': {ex.Message}");
Security.TransportSecurity.IntegrationTests (7)
Https\ClientCredentialTypeTests.4.1.0.cs (2)
163Assert.True(exception.Message.ToLower().Contains(message), string.Format("Expected exception message to contain: '{0}', actual message is: '{1}'", message, exception.Message));
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (3)
87errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message); 164errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message); 248errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message);
Tcp\IdentityTests.4.1.1.cs (2)
42Assert.True(exception.Message.Contains(Endpoints.Tcp_VerifyDNS_HostName), string.Format("Expected exception message contains: '{0}', actual: '{1}')", Endpoints.Tcp_VerifyDNS_HostName, exception.Message));
SelectTests (3)
Program.cs (3)
481throw new InvalidOperationException($"Layer 1 (affected-projects graph) failed: {inner.Message}", inner); 508sb.AppendLine(CultureInfo.InvariantCulture, $"- error: {ex.GetType().Name}: {ex.Message}"); 547Console.Error.WriteLine($"[SelectTests] could not write diagnostics to GITHUB_STEP_SUMMARY: {writeEx.Message}");
Shared (1)
LogBuffering\SerializedLogRecordFactory.cs (1)
46exceptionMessage = exception.Message;
Shared.Tests (79)
Throw\DoubleTests.cs (12)
143Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 156Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 169Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 182Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 195Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 208Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Throw\IntegerTests.cs (24)
115Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 128Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 141Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 154Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 167Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 180Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 287Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 300Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 313Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 326Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 339Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 352Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Throw\LongTests.cs (24)
115Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 128Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 141Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 154Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 167Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 180Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 287Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 300Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 313Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 326Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 339Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 352Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
Throw\ThrowTest.cs (19)
21Assert.Contains(message, exception.Message, StringComparison.Ordinal); 32Assert.Contains(message, exception.Message, StringComparison.Ordinal); 151Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 167Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 183Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 191Assert.Equal(expectedMessage, exceptionImplicitArgumentName.Message); 199Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 207Assert.Equal(expectedMessage, exceptionImplicitArgumentName.Message); 283Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 296Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message); 395Assert.Contains(nameof(listButActuallyNull), exceptionImplicitArgumentName.Message); 435Assert.Equal(exceptionExplicitArgumentName.Message, exceptionImplicitArgumentName.Message);
SuperFileCheck (3)
Program.cs (3)
162return new FileCheckResult(1, String.Empty, ex.Message); 666Console.WriteLine(ex.Message); 757Console.WriteLine(ex.Message);
System.Collections.Concurrent (1)
System\Collections\Concurrent\ConcurrentBag.cs (1)
303throw new InvalidCastException(e.Message, e);
System.CommandLine (1)
LocalizationResources.cs (1)
102GetResourceString(Properties.Resources.ErrorReadingResponseFile, filePath, e.Message);
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\ValidationException.cs (1)
97_validationResult ??= new ValidationResult(Message);
System.ComponentModel.Composition (16)
System\ComponentModel\Composition\CompositionContractMismatchException.cs (2)
32/// the <see cref="Exception.Message"/> property to its default value. 47/// the <see cref="Exception.Message"/> property to its default value.
System\ComponentModel\Composition\CompositionException.cs (4)
41/// the <see cref="Exception.Message"/> property to its default value. 56/// the <see cref="Exception.Message"/> property to its default value. 127return base.Message; 318VisitError(new CompositionError(exception.Message, exception.InnerException), context);
System\ComponentModel\Composition\ErrorBuilder.cs (1)
42exception.Message,
System\ComponentModel\Composition\ImportCardinalityMismatchException.cs (2)
35/// the <see cref="Exception.Message"/> property to its default value. 50/// the <see cref="Exception.Message"/> property to its default value.
System\ComponentModel\Composition\ImportCardinalityMismatchExceptionDebuggerProxy.cs (1)
26get { return _exception.Message; }
System\ComponentModel\Composition\Primitives\ComposablePartException.cs (4)
66/// the <see cref="Exception.Message"/> property to its default value. 81/// the <see cref="Exception.Message"/> property to its default value. 102/// the <see cref="Exception.Message"/> property to its default value. 122/// the <see cref="Exception.Message"/> property to its default value.
System\ComponentModel\Composition\Primitives\ComposablePartExceptionDebuggerProxy.cs (1)
31get { return _exception.Message; }
System\Composition\Diagnostics\CompositionTrace.cs (1)
58exception.Message);
System.ComponentModel.TypeConverter (1)
System\ComponentModel\ReflectPropertyDescriptor.cs (1)
938string message = t.Message ?? t.GetType().Name;
System.Configuration.ConfigurationManager (10)
System\Configuration\BaseConfigurationRecord.cs (1)
3613SR.Format(SR.Decryption_failed, protectionProvider.Name, e.Message), e, filename, lineNumber);
System\Configuration\ConfigurationElement.cs (1)
1781ex.Message));
System\Configuration\ConfigurationException.cs (1)
85public virtual string BareMessage => base.Message;
System\Configuration\ConfigurationProperty.cs (4)
306Name, ex.Message)); 337ex.Message)); 360SR.Format(SR.Top_level_conversion_error_to_string, Name, ex.Message)); 373SR.Format(SR.Top_level_validation_error, Name, ex.Message), ex);
System\Configuration\ExceptionUtil.cs (1)
75SR.Format(SR.Wrapped_exception_message, outerMessage, e.Message),
System\Configuration\MgmtConfigurationRecord.cs (1)
1679configSection.SectionInformation.ProtectionProvider.Name, e.Message),
System\Configuration\SettingsPropertyValue.cs (1)
145throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value, Property.Name, e.Message));
System.Data.Common (8)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
502string msg1 = e.Message;
System\Data\Common\DbDataAdapter.cs (3)
1665string message = errors.Message; 1674string rowMsg = commandErrors.Message; 1733string message = errors.Message;
System\Data\Constraint.cs (1)
121throw ExceptionBuilder.BadObjectPropertyAccess(e.Message);
System\Data\DataException.cs (1)
503public static Exception SetFailed(object? value, DataColumn column, Type type, Exception innerException) => _Argument(innerException.Message + SR.Format(SR.DataColumn_SetFailed, value?.ToString(), column.ColumnName, type.Name), innerException);
System\Data\DataRelation.cs (1)
677throw ExceptionBuilder.BadObjectPropertyAccess(e.Message);
System\Data\Merger.cs (1)
591_dataSet.RaiseMergeFailed(null, e.Message, _missingSchemaAction);
System.Data.Odbc (2)
src\runtime\src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (1)
502string msg1 = e.Message;
System\Data\Odbc\DbDataRecord.cs (1)
66throw new OverflowException(innerException.Message, innerException);
System.Data.OleDb (4)
DbConnectionOptions.cs (1)
853string msg1 = e.Message;
OleDbException.cs (2)
24internal OleDbException(OleDbException previous, Exception? inner) : base(previous.Message, inner) 115builder.Append(exception.Message);
OleDbInfoMessageEvent.cs (1)
38return this.exception.Message;
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Activity.cs (1)
596exceptionTags.Add(new KeyValuePair<string, object?>(ExceptionMessageTag, exception.Message));
System.Diagnostics.EventLog (2)
System\Diagnostics\EventLogInternal.cs (1)
1083throw new InvalidOperationException(SR.Format(SR.CantOpenLog, logname, currentMachineName, e?.Message ?? ""));
System\Diagnostics\Reader\EventLogException.cs (1)
65return win32Exception.Message;
System.DirectoryServices (9)
System\DirectoryServices\ActiveDirectory\Exception.cs (4)
75string s = base.Message; 164string s = base.Message; 303string errorMessage = e.Message; 411return new Win32Exception((int)temp).Message;
System\DirectoryServices\DirectoryEntry.cs (3)
792throw new TargetInvocationException(e.Message, COMExceptionHelper.CreateFormattedComException(inner)); 825throw new TargetInvocationException(e.Message, COMExceptionHelper.CreateFormattedComException(inner)); 854throw new TargetInvocationException(e.Message, COMExceptionHelper.CreateFormattedComException(inner));
System\DirectoryServices\DirectoryServicesCOMException.cs (2)
28internal DirectoryServicesCOMException(string? extendedMessage, int extendedError, COMException e) : base(e.Message, e.ErrorCode) 52string errorMsg = new Win32Exception(hr).Message;
System.DirectoryServices.AccountManagement (27)
System\DirectoryServices\AccountManagement\AD\ADAMStoreCtx.cs (2)
154e.Message); 198GlobalDebug.WriteLineIf(GlobalDebug.Error, "ADAMStoreCtx", "SetupPasswordModification: caught TargetInvocationException with message " + e.Message);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (1)
389throw new ArgumentException(e.Message, e);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (5)
410GlobalDebug.WriteLineIf(GlobalDebug.Error, "ADStoreCtx", "Insert, Save Failed (attempting to delete) Exception {0} ", e.Message); 424GlobalDebug.WriteLineIf(GlobalDebug.Error, "ADStoreCtx", "Insert, Deletion Failed {0} ", deleteFail.Message); 1242throw new PrincipalOperationException(e.Message, e); 1247throw new PrincipalOperationException(e.Message, e); 2562e.Message);
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (6)
291GlobalDebug.WriteLineIf(GlobalDebug.Error, "SDSUtils", "ApplyChangesToDirectory: caught COMException with message " + e.Message); 318GlobalDebug.WriteLineIf(GlobalDebug.Error, "SDSUtils", "SetPassword: caught TargetInvocationException with message " + e.Message); 326throw (new PasswordException(((System.Runtime.InteropServices.COMException)e.InnerException).Message, (System.Runtime.InteropServices.COMException)e.InnerException)); 352GlobalDebug.WriteLineIf(GlobalDebug.Error, "SDSUtils", "ChangePassword: caught TargetInvocationException with message " + e.Message); 360throw (new PasswordException(((System.Runtime.InteropServices.COMException)e.InnerException).Message, (System.Runtime.InteropServices.COMException)e.InnerException)); 469e.Message,
System\DirectoryServices\AccountManagement\AuthZSet.cs (1)
192GlobalDebug.WriteLineIf(GlobalDebug.Error, "AuthZSet", "Caught exception {0} with message {1}", e.GetType(), e.Message);
System\DirectoryServices\AccountManagement\Context.cs (3)
657" and message " + e.Message); 759" and message " + e.Message); 914" and message " + e.Message);
System\DirectoryServices\AccountManagement\exceptions.cs (2)
258string errorMessage = e.Message; 362return new Win32Exception((int)temp).Message;
System\DirectoryServices\AccountManagement\Principal.cs (2)
419GlobalDebug.WriteLineIf(GlobalDebug.Error, "Principal", "Save(context):, Update Failed (attempting to move back) Exception {0} ", e.Message); 431GlobalDebug.WriteLineIf(GlobalDebug.Error, "Principal", "Save(context):, Move back Failed {0} ", deleteFail.Message);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (2)
582e.Message, 1139e.Message,
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (1)
441GlobalDebug.WriteLineIf(GlobalDebug.Error, "SAMStoreCtx", "UnlockAccount: caught COMException, message={0}", e.Message);
System\DirectoryServices\AccountManagement\SAM\SAMUtils.cs (1)
43GlobalDebug.WriteLineIf(GlobalDebug.Error, "SAMUtils", "GetOSVersion: caught COMException with message " + e.Message);
System\DirectoryServices\AccountManagement\Utils.cs (1)
163" and message " + e.Message);
System.DirectoryServices.Protocols (1)
System\DirectoryServices\Protocols\ldap\LdapPartialResultsProcessor.cs (1)
371Debug.WriteLine(e.Message);
System.Drawing.Primitives (1)
System\Drawing\ColorTranslator.cs (1)
278throw new ArgumentException(ex.Message, nameof(htmlColor), ex);
System.Formats.Asn1 (1)
System\Formats\Asn1\AsnWriter.cs (1)
550throw new InvalidOperationException(new InvalidOperationException().Message, e);
System.IO.Pipelines (1)
System\IO\Pipelines\StreamPipeReader.cs (1)
290throw new OperationCanceledException(ex.Message, ex, cancellationToken);
System.IO.Ports (1)
System\IO\Ports\InternalResources.cs (1)
19return new Win32Exception(errorCode).Message;
System.Management (1)
System\Management\ManagementException.cs (1)
748msg = e.Message;
System.Net.Http (15)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (2)
21base.Message + " " + _unexpectedValue : 22base.Message;
System\Net\Http\CancellationHelper.cs (1)
13private static readonly string s_cancellationMessage = new OperationCanceledException().Message; // use same message as the default ctor
System\Net\Http\DiagnosticsHandler.cs (1)
301[DynamicDependency(nameof(System.Exception.Message), typeof(Exception))]
System\Net\Http\Headers\ByteArrayHeaderParser.cs (1)
52if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, SR.Format(SR.net_http_parser_invalid_base64_string, base64String, e.Message));
System\Net\Http\HttpClient.cs (2)
614e = toThrow = new TaskCanceledException(oce.Message, oce, cancellationToken); 627e = toThrow = new TaskCanceledException(SR.Format(SR.net_http_request_timedout, _timeout.TotalSeconds), new TimeoutException(e.Message, e), oce.CancellationToken);
System\Net\Http\HttpIOException.cs (1)
31public override string Message => $"{base.Message} ({HttpRequestError})";
System\Net\Http\HttpTelemetry.cs (1)
82RequestFailed(exceptionMessage: exception.Message);
System\Net\Http\SocketsHttpHandler\ConnectHelper.cs (1)
143new HttpRequestException(DeduceError(exception), $"{exception.Message} ({host}:{port})", exception, RequestRetryType.RetryOnNextProxy);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (2)
626if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(ProcessIncomingFramesAsync)}: {e.Message}"); 1397if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(HeartBeat)}: {e.Message}");
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (3)
327throw new TaskCanceledException(ex.Message, ex, cancellationToken); 351throw new TaskCanceledException(ex.Message, ex, cancellationToken); 1368throw new TaskCanceledException(e.Message, e, cancellationToken);
System.Net.Http.Json (1)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
98throw new TaskCanceledException(message, new TimeoutException(oce.Message, oce), oce.CancellationToken);
System.Net.Http.WinHttpHandler (1)
System\Net\Http\WinHttpRequestCallback.cs (1)
522"Error code: " + asyncResult.dwError + " (" + innerException.Message + ")");
System.Net.HttpListener (10)
System\Net\HttpListenerException.cs (4)
16if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 21if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 26if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}"); 34if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(this, $"{NativeErrorCode}:{Message}");
System\Net\Managed\ChunkedInputStream.cs (2)
147_context.Connection.SendError(e.Message, 400); 171throw new HttpListenerException((int)HttpStatusCode.BadRequest, SR.Format(SR.net_io_operation_aborted, ares._error.Message));
System\Net\Managed\HttpConnection.cs (1)
402_context.ErrorMessage = e.Message;
System\Net\Managed\HttpResponseStream.Managed.cs (3)
152throw new HttpListenerException(ex.HResult, ex.Message); 254throw new HttpListenerException(ex.HResult, ex.Message); 292throw new HttpListenerException(ex.HResult, ex.Message);
System.Net.Mail (1)
System\Net\Mime\ContentType.cs (1)
282catch (FormatException fe) when (fe.Message != SR.ContentTypeInvalid)
System.Net.NameResolution (2)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (2)
21base.Message + " " + _unexpectedValue : 22base.Message;
System.Net.Primitives (1)
System\Net\SocketException.cs (1)
50public override string Message => base.Message;
System.Net.Requests (8)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (2)
21base.Message + " " + _unexpectedValue : 22base.Message;
System\Net\FileWebRequest.cs (2)
154catch (Exception e) { throw new WebException(e.Message, e); } 214throw new WebException(e.Message, e);
System\Net\FileWebResponse.cs (1)
45throw new WebException(e.Message, e, WebExceptionStatus.ConnectFailure, null);
System\Net\FtpWebRequest.cs (2)
1107_exception = new WebException(exception.Message, null, ((WebException)exception).Status, _ftpWebResponse); 1120_exception = new WebException(exception.Message, exception);
System\Net\WebException.cs (1)
86exception.Message,
System.Net.Security (5)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (2)
21base.Message + " " + _unexpectedValue : 22base.Message;
System\Net\Security\SslStream.IO.cs (1)
145NetSecurityTelemetry.Log.HandshakeFailed(IsServer, startingTimestamp, ex.Message);
System\Net\Security\SslStream.Protocol.cs (2)
803NetEventSource.Error(this, $"Authentication failed. Status: {wedged.Status}, Exception message: {wedged.GetException()!.Message}"); 813NetEventSource.Error(this, $"Authentication failed. Status: {token.Status}, Exception message: {token.GetException()!.Message}");
System.Net.Sockets (10)
src\runtime\src\libraries\Common\src\System\Net\InternalException.cs (2)
21base.Message + " " + _unexpectedValue : 22base.Message;
System\Net\Sockets\NetworkStream.cs (1)
721return new IOException(SR.Format(resourceFormatString, innerException.Message), innerException);
System\Net\Sockets\Socket.cs (5)
1072SocketsTelemetry.Log.AfterAccept(SocketError.Interrupted, ex.Message); 2876SocketsTelemetry.Log.AfterAccept(SocketError.Interrupted, ex.Message); 2962SocketsTelemetry.Log.AfterConnect(SocketError.NotSocket, e.ConnectActivity, ex.Message); 2979SocketsTelemetry.Log.AfterConnect(SocketError.NotSocket, e.ConnectActivity, ex.Message); 3376SocketsTelemetry.Log.AfterConnect(SocketError.NotSocket, activity, ex.Message);
System\Net\Sockets\Socket.Tasks.cs (2)
905new IOException(SR.Format(SR.net_io_readwritefailure, e.Message), e) : 1378new IOException(SR.Format(_isReadForCaching ? SR.net_io_readfailure : SR.net_io_writefailure, e.Message), e) :
System.Net.WebSockets (5)
System\Net\WebSockets\Compression\WebSocketDeflater.cs (1)
218throw new WebSocketException(ex.Message, ex.InnerException);
System\Net\WebSockets\Compression\WebSocketInflater.cs (1)
277throw new WebSocketException(ex.Message, ex.InnerException);
System\Net\WebSockets\ManagedWebSocket.cs (1)
1744new OperationCanceledException().Message,
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
66if (NetEventSource.Log.IsEnabled()) NetEventSource.Trace(this, $"KeepAlive already faulted, skipping... (exception: {_keepAlivePingState.Exception.Message})");
System\Net\WebSockets\NetEventSource.WebSockets.cs (1)
84=> Trace(obj, $"{exception.GetType().Name}: {exception.Message}", memberName);
System.Net.WebSockets.Client (3)
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (3)
407if (ex.Message.StartsWith("InvalidState:")) 452if (ex.Message.StartsWith("InvalidState:")) 588if (ex is OperationCanceledException || cancellationToken.IsCancellationRequested || ex.Message == "Error: OperationCanceledException")
System.Private.CoreLib (34)
src\runtime\src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (4)
335return new AggregateException(GetType() == typeof(AggregateException) ? base.Message : Message, flattenedExceptions.ToArray(), cloneExceptions: false); 345return base.Message; 349sb.Append(base.Message); 354sb.Append(_innerExceptions[i].Message);
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppContext.cs (1)
115RuntimeExceptionHelpers.SerializeCrashInfo(System.Runtime.RhFailFastReason.UnhandledException, (e as Exception)?.Message, e as Exception);
src\runtime\src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (1)
79string s = base.Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ComponentModel\Win32Exception.cs (1)
92string message = Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\ContractException.cs (1)
19public string Failure => this.Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.Unix.cs (1)
28Environment.FailFast(ex.Message, ex, errorSource);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (5)
1733ReportOutOfBandMessage("ERROR: Exception during construction of EventSource " + Name + ": " + e.Message); 2212+ e.Message); 2457ReportOutOfBandMessage(errorPrefix + ": " + innerEx.GetType() + ":" + innerEx.Message); 2824ReportOutOfBandMessage("ERROR: Exception in Command Processing for EventSource " + Name + ": " + e.Message); 3347msg = "Unexpected error: " + exception!.Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\IncrementingPollingCounter.cs (1)
60ReportOutOfBandMessage($"ERROR: Exception during EventCounter {Name} getMetricFunction callback: " + ex.Message);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\PollingCounter.cs (1)
56ReportOutOfBandMessage($"ERROR: Exception during EventCounter {Name} metricProvider callback: " + ex.Message);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Exception.cs (1)
127string? message = Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\DirectoryNotFoundException.cs (1)
56string s = GetType().ToString() + ": " + Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\InvalidDataException.cs (3)
16/// <remarks>This constructor initializes the <see cref="Exception.Message" /> property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message is localized based on the current system culture.</remarks> 24/// <remarks>This constructor initializes the <see cref="Exception.Message" /> property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message is localized based on the current system culture.</remarks> 33/// <remarks>This constructor initializes the <see cref="Exception.Message" /> property of the new instance using the value of the <paramref name="message" /> parameter. The content of the <paramref name="message" /> parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
src\runtime\src\libraries\System.Private.CoreLib\src\System\MissingMemberException.cs (1)
65return base.Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (2)
96return base.Message; 100return base.Message + Environment.NewLineConst + objectDisposed;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\ReflectionTypeLoadException.cs (2)
55string baseValue = isMessage ? base.Message : base.ToString(); 68text.AppendLine().Append(isMessage ? e.Message : e.ToString());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (2)
59return base.Message; 63return base.Message + Environment.NewLine + valueMessage;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\COMException.cs (1)
56string message = Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ExternalException.cs (1)
52string message = Message;
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
652if (ex != null && !string.IsNullOrEmpty(ex.Message)) 654ex = new ApplicationException(ex.Message);
System\CrashInfo.cs (1)
180if (!WriteStringValue("message"u8, exception.Message, maxMessageSize))
System\Exception.NativeAot.cs (1)
134string message = !fatalOutOfMemory ? ex.Message :
System.Private.DataContractSerialization (9)
System\Runtime\Serialization\DataContract.cs (4)
438throw new Exception(ex.Message, ex); 917throw new Exception(ex.Message, ex); 935throw new Exception(ex.Message, ex); 947throw new Exception(ex.Message, ex);
System\Runtime\Serialization\SchemaImporter.cs (2)
814ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.IsValueTypeFormattedIncorrectly, isValueTypeInnerText, fe.Message)); 1161ThrowTypeCannotBeImportedException(typeName.Name, typeName.Namespace, SR.Format(SR.IsDictionaryFormattedIncorrectly, isDictionaryInnerText, fe.Message));
System\Runtime\Serialization\XmlObjectSerializer.cs (1)
459string innerExceptionMessage = (innerException == null) ? string.Empty : innerException.Message;
System\Xml\ValueHandle.cs (1)
463throw new XmlException(exception.Message, exception.InnerException);
System\Xml\XmlBaseReader.cs (1)
1512throw new XmlException(exception.Message, exception.InnerException);
System.Private.Windows.Core (13)
System\ExceptionExtensions.cs (1)
41new SerializationException(ex.Message, ex),
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (2)
656new BinaryObjectString(3, exception.Message), 803Debug.WriteLine($"Failed to binary format: {ex.Message}");
System\Private\Windows\JsonData.cs (1)
123result = new NotSupportedException(ex.Message);
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
51Debug.Fail(ex.Message);
System\Private\Windows\Ole\BinaryFormatUtilities.cs (1)
52Debug.Fail($"Unexpected exception writing binary formatted data. {ex.Message}");
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (1)
389Debug.Assert(e is NotSupportedException, e.Message);
System\TypeExtensions.cs (1)
280Debug.Fail(e.Message);
Windows\Win32\PInvokeCore.GetWindowText.cs (2)
31Debug.Fail($"GetWindowTextLength failed. Error: {new Win32Exception(error).Message}"); 50Debug.Fail($"GetWindowText failed. Error: {new Win32Exception().Message}");
Windows\Win32\System\Com\ComHelpers.cs (2)
113Debug.WriteLine($"Did not find IUnknown for {@object.GetType().Name}. {ex.Message}"); 229Debug.WriteLine($"{nameof(TryGetObjectForIUnknown)}: Failed to get object for {typeof(TObject).Name}. {ex.Message}");
Windows\Win32\System\Com\WinFormsComWrappers.cs (1)
85Debug.Fail($"Exception thrown in UnwrapAndInvoke {ex.Message}.");
System.Private.Xml (27)
System\Xml\BinaryXml\XmlBinaryReader.cs (1)
969throw new XmlException(e.Message, e);
System\Xml\Core\XmlTextReaderImpl.cs (2)
2732Throw(new XmlException(e.Message, (Exception?)null, lineNo, linePos, _ps.baseUriStr)); 7939string innerMessage = e.Message;
System\Xml\Core\XmlTextReaderImplAsync.cs (1)
5138innerMessage = e.Message;
System\Xml\Schema\DataTypeImplementation.cs (2)
535throw new XmlSchemaException(SR.Sch_InvalidValueDetailed, new string[] { s, GetTypeName(), exception.Message }, exception, null, 0, 0, null); 556throw new XmlSchemaException(SR.Sch_InvalidValueDetailed, new string[] { s, GetTypeName(), exception.Message }, exception, null, 0, 0, null);
System\Xml\Schema\FacetChecker.cs (2)
371throw new XmlSchemaException(SR.Sch_PatternFacetInvalid, new string[] { e.Message }, e, _pattern_facet!.SourceUri, _pattern_facet.LineNumber, _pattern_facet.LinePosition, _pattern_facet); 673throw new XmlSchemaException(code, new string[] { ex.Message }, ex, facet.SourceUri, facet.LineNumber, facet.LinePosition, facet);
System\Xml\Schema\Preprocessor.cs (4)
546SendValidationEvent(SR.Sch_AttributeValueDataTypeDetailed, new string[] { "version", schema.Version, tokenDt.TypeCodeString, exception.Message }, exception, schema); 1993SendValidationEvent(SR.Sch_InvalidAnyDetailed, new string[] { fe.Message }, fe, particle); 2037SendValidationEvent(SR.Sch_InvalidAnyDetailed, new string[] { fe.Message }, fe, anyAttribute); 2114SendValidationEvent(SR.Sch_InvalidAttribute, new string[] { attributeName, fx.Message }, fx, xso);
System\Xml\Schema\SchemaCollectionpreProcessor.cs (2)
1725SendValidationEvent(SR.Sch_InvalidIdAttribute, ex.Message, xso); 1766SendValidationEvent(SR.Sch_InvalidAttribute, attributeName, ex.Message, xso);
System\Xml\Schema\XdrValidator.cs (1)
360SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
System\Xml\Schema\XmlSchemaException.cs (1)
221return _message ?? base.Message;
System\Xml\Schema\XmlSchemaValidator.cs (6)
1276SendValidationEvent(SR.Sch_InvalidValueDetailedAttribute, new string[] { "schemaLocation", xsiSchemaLocation, s_dtStringArray.TypeCodeString, exception.Message }, exception); 1476SendValidationEvent(SR.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName!, _context.Namespace!), TruncateValueForErrorMessage(stringValue), GetTypeName(decl), exception.Message }, exception); 1655SendValidationEvent(SR.Sch_InvalidValueDetailedAttribute, new string[] { "type", xsiType, s_dtQName.TypeCodeString, exception.Message }, exception); 1866SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, e, XmlSeverityType.Warning); 1968SendValidationEvent(SR.Sch_AttributeValueDataTypeDetailed, new string[] { attdef.Name.ToString(), TruncateValueForErrorMessage(stringValue), GetTypeName(decl), exception.Message }, exception); 1983SendValidationEvent(SR.Sch_ElementValueDataTypeDetailed, new string[] { QNameString(_context.LocalName!, _context.Namespace!), TruncateValueForErrorMessage(stringValue), GetTypeName(decl), exception.Message }, exception);
System\Xml\Schema\XsdValidator.cs (1)
609SendValidationEvent(SR.Sch_CannotLoadSchema, new string[] { uri, e.Message }, XmlSeverityType.Warning);
System\Xml\Serialization\Compilation.cs (1)
77throw new InvalidOperationException(ex.Message, ex);
System\Xml\XmlException.cs (1)
280return _message ?? base.Message;
System\Xml\XPath\XPathException.cs (1)
126return _message ?? base.Message;
System\Xml\Xslt\XsltException.cs (1)
120return _message ?? base.Message;
System.Reflection.Metadata (4)
System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs (1)
138throw new IOException(e.Message, e);
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
110throw new BadImageFormatException(ex.Message, assemblyFile, ex);
System\Reflection\PortableExecutable\PEReader.cs (1)
731throw new ArgumentException(e.Message, nameof(peImagePath), e);
System\Reflection\PortableExecutable\PEReader.EmbeddedPortablePdb.cs (1)
106throw new BadImageFormatException(e.Message, e);
System.Resources.Extensions (1)
System\Resources\Extensions\BinaryFormat\SerializationExtensions.cs (1)
20new SerializationException(ex.Message, ex),
System.Runtime.InteropServices.JavaScript (4)
System\Runtime\InteropServices\JavaScript\JSException.cs (3)
67else if (jsStackTrace.StartsWith(Message + "\n")) 71jsStackTrace = jsStackTrace.Substring(Message.Length + 1); 105return Message;
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Exception.cs (1)
94ToJS(cpy.Message);
System.ServiceModel.Http (13)
System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (3)
85new WebSocketException(WebSocketError.ConnectionClosedPrematurely).Message); 112WcfEventSource.Instance.WebSocketConnectionFailed(EventTraceActivity, ex.Message); 266throw FxTrace.Exception.AsError(new CommunicationException(ex.Message, ex));
System\ServiceModel\Channels\HttpChannelHelpers.cs (2)
113throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new CommunicationException(requestException.Message, requestException)); 159return new CommunicationException(exception.Message, exception);
System\ServiceModel\Channels\MessageContent.cs (1)
119new ProtocolException(SR.Format(SR.HttpContentTypeFormatException, formatException.Message, Headers.ContentType.ToString()), formatException));
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (3)
134WcfEventSource.Instance.ReceiveTimeout(e.Message); 154WcfEventSource.Instance.ReceiveTimeout(e.Message); 172WcfEventSource.Instance.ReceiveTimeout(e.Message);
System\ServiceModel\Channels\WebSocketHelper.cs (3)
139CommunicationObjectAbortedException communicationObjectAbortedException = new CommunicationObjectAbortedException(ex.Message, ex); 182return new CommunicationObjectAbortedException(exception.Message, exception); 185return new CommunicationException(exception.Message, exception);
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (1)
639WcfEventSource.Instance.ReceiveTimeout(exception.Message);
System.ServiceModel.NetFramingBase (16)
System\ServiceModel\Channels\Connection.cs (3)
348return new TimeoutException(ioException.InnerException.Message, ioException); 352return new CommunicationObjectAbortedException(ioException.InnerException.Message, ioException); 356return new CommunicationException(ioException.InnerException.Message, ioException);
System\ServiceModel\Channels\ConnectionPool.cs (1)
186WcfEventSource.Instance.CloseTimeout(exception.Message);
System\ServiceModel\Channels\FramingDecoders.cs (3)
293return new CommunicationException(inner.Message, inner); 306return new CommunicationException(inner.Message, inner); 311return new CommunicationException(inner.Message, inner);
System\ServiceModel\Channels\SessionConnectionReader.cs (1)
159WcfEventSource.Instance.ReceiveTimeout(e.Message);
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (3)
374throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityNegotiationException(tokenValidationException.Message, 379throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityNegotiationException(exception.Message, 385SR.Format(SR.NegotiationFailedIO, ioException.Message), ioException));
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (3)
137WcfEventSource.Instance.ReceiveTimeout(e.Message); 156WcfEventSource.Instance.ReceiveTimeout(e.Message); 174WcfEventSource.Instance.ReceiveTimeout(e.Message);
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (2)
186throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityNegotiationException(exception.Message, 192SR.Format(SR.NegotiationFailedIO, ioException.Message), ioException));
System.ServiceModel.NetNamedPipe (5)
System\ServiceModel\Channels\PipeConnection.cs (1)
88return ConvertPipeException(pipeException.Message, pipeException, transferOperation);
System\ServiceModel\Channels\PipeConnectionInitiator.cs (4)
199resolvedAddress, ex.Message), ex.HResult); 221resolvedAddress, ex.Message), error); 235PipeException innerException = new PipeException(SR.Format(SR.PipeModeChangeFailed, ex.Message), ex.HResult); 437exception.Message,
System.ServiceModel.Primitives (36)
Internals\System\Runtime\Diagnostics\EtwDiagnosticTrace.cs (1)
78new Tuple<string, string> (DiagnosticStrings.MessageTag, XmlEncode(exception.Message)),
Internals\System\Xml\XmlMtomReader.cs (1)
1328throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(e.Message, e));
System\IdentityModel\Selectors\X509CertificateValidator.cs (2)
276throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(exception.Message + " " + ex.Message));
System\ServiceModel\ActionNotSupportedException.cs (1)
25string reason = Message;
System\ServiceModel\Channels\Message.cs (2)
1353new CommunicationException(versionMismatchException.Message, versionMismatchException), 1581new CommunicationException(versionMismatchException.Message, versionMismatchException),
System\ServiceModel\Channels\MessageHeader.cs (1)
320throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new XmlException(exception.Message, null));
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (1)
882new CommunicationException(exception.Message, exception));
System\ServiceModel\Channels\RequestContextBase.cs (1)
321WcfEventSource.Instance.CloseTimeout(e.Message);
System\ServiceModel\Channels\ServiceChannel.cs (1)
859WcfEventSource.Instance.CloseTimeout(e.Message);
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (3)
296SRP.Format(SRP.SFxInvalidMessageBodyErrorSerializingParameter, part.Description.Namespace, part.Description.Name, sx.Message), sx)); 538part.Description.Namespace, part.Description.Name, e.Message), 546part.Description.Namespace, part.Description.Name, e.Message),
System\ServiceModel\Dispatcher\ErrorBehavior.cs (2)
96fault = MessageFault.CreateFault(code, new FaultReason(error.Message), new ExceptionDetail(error)); 129WcfEventSource.Instance.FaultProviderInvoked(_handlers[i].GetType().FullName, e.Message);
System\ServiceModel\Dispatcher\ImmutableDispatchRuntime.cs (2)
583throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(e.Message, e); 683throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(e.Message, e);
System\ServiceModel\Dispatcher\MessageRpc.cs (1)
468throw DiagnosticUtility.ExceptionUtility.ThrowHelperFatal(e.Message, e);
System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
156SRP.Format(SRP.SFxErrorDeserializingReplyBodyMore, _operationName, fe.Message), fe)); 161SRP.Format(SRP.SFxErrorDeserializingReplyBodyMore, _operationName, se.Message), se)); 225SRP.Format(SRP.SFxErrorDeserializingRequestBodyMore, _operationName, fe.Message), 231SRP.Format(SRP.SFxErrorDeserializingRequestBodyMore, _operationName, se.Message),
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (4)
511SRP.Format(SRP.SFxErrorDeserializingReplyBodyMore, _operation.Name, fe.Message), fe)); 516SRP.Format(SRP.SFxErrorDeserializingReplyBodyMore, _operation.Name, se.Message), se)); 562SRP.Format(SRP.SFxErrorDeserializingRequestBodyMore, _operation.Name, fe.Message), 568SRP.Format(SRP.SFxErrorDeserializingRequestBodyMore, _operation.Name, se.Message),
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (2)
140SRP.Format(SRP.SFxErrorSerializingHeader, messageDescription.MessageName, e.Message), e)); 364SRP.Format(SRP.SFxErrorSerializingBody, messageDescription.MessageName, e.Message), e));
System\ServiceModel\ExceptionDetail.cs (1)
25Message = exception.Message;
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (4)
286throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 303throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 320throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message)); 337throw FxTrace.Exception.AsError(new MessageSecurityException(ex.Message));
System\ServiceModel\WSAddressing10ProblemHeaderQNameFault.cs (2)
39_reason = new FaultReason(e.Message, CultureInfo.CurrentCulture); 49_reason = new FaultReason(e.Message, CultureInfo.CurrentCulture);
System.ServiceModel.Primitives.Tests (25)
Channels\CommunicationObjectTest.cs (8)
322Assert.True(String.Equals(exceptionMessage, actualException.Message), 324exceptionMessage, actualException.Message)); 349Assert.True(String.Equals(exceptionMessage, actualException.Message), 351exceptionMessage, actualException.Message)); 376Assert.True(String.Equals(exceptionMessage, actualException.Message), 378exceptionMessage, actualException.Message)); 407Assert.True(String.Equals(exceptionMessage, actualException.Message), 409exceptionMessage, actualException.Message));
Channels\CustomChannelTest.cs (12)
251Assert.True(String.Equals(expectedExceptionMessage, actualException.Message), 253expectedExceptionMessage, actualException.Message)); 306Assert.True(String.Equals(expectedExceptionMessage, actualException.Message), 308expectedExceptionMessage, actualException.Message)); 471Assert.True(String.Equals(caughtException.Message, thrownException.Message), 473thrownException.Message, caughtException.Message)); 725Assert.True(string.Equals(thrownException.Message, caughtException.Message), 727thrownException.Message, caughtException.Message));
Description\OperationContractAttributeTest.cs (2)
34Assert.Contains("INonInitiatingNonTerminatingService", exception.Message); 47Assert.Contains("IInitiatingTerminatingService", exception.Message);
Security\SecurityNegotiationExceptionTest.cs (2)
24Assert.Equal(exceptionMessage, exception2.Message); 27Assert.Equal(exceptionMessage, exception3.InnerException.Message);
ServiceModel\DuplexChannelFactoryTest.cs (1)
109Assert.True(exception.Message.Contains("BasicHttpBinding"),
System.ServiceProcess.ServiceController (3)
System\ServiceProcess\ServiceBase.cs (3)
619errorMessage = new Win32Exception().Message; 891string errorMessage = new Win32Exception().Message; 935string errorMessage = new Win32Exception().Message;
System.Speech (5)
Internal\ResourceLoader.cs (1)
51throw new IOException(e.Message, e);
Internal\SrgsParser\XmlParser.cs (1)
104ThrowSrgsExceptionWithPosition(_filename, _reader, e.Message, e.InnerException);
Recognition\GrammarBuilder.cs (2)
213throw new ArgumentException(e.Message, path, e); 234throw new ArgumentException(e.Message, path, e);
Synthesis\PromptBuilder.cs (1)
668throw new ArgumentException(e.Message, path, e);
System.Text.Json (5)
System\Text\Json\JsonException.cs (1)
145return _message ?? base.Message;
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (1)
82case NotSupportedException when !ex.Message.Contains(" Path: "):
System\Text\Json\Serialization\JsonConverterOfT.WriteCore.cs (1)
41case NotSupportedException when !ex.Message.Contains(" Path: "):
System\Text\Json\ThrowHelper.Serialization.cs (2)
633string message = innerException.Message; 661string message = innerException.Message;
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\RegexMatchTimeoutException.cs (3)
82/// This constructor initializes the <see cref="Exception.Message"/> property of the new instance 95/// <see cref="Exception.Message"/> property. The string should be localized for the current 116/// <see cref="Exception.Message"/> property. The string should be localized for the current
System.Text.RegularExpressions.Generator (2)
RegexGenerator.cs (1)
98return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, method.DiagnosticLocation, e.Message);
RegexGenerator.Parser.cs (1)
157return Diagnostic.Create(DiagnosticDescriptors.InvalidRegexArguments, memberSyntax.GetLocation(), e.Message);
System.Threading.Tasks.Dataflow (1)
Internal\Common.cs (1)
141return exception.Message;
System.Transactions.Local (1)
System\Transactions\Oletx\OletxTransactionManager.cs (1)
623: comException.Message,
System.Windows.Forms (43)
System\Resources\ResXDataNode.cs (2)
308Debug.Fail($"Unexpected exception writing binary formatted data. {ex.Message}"); 375string newMessage = string.Format(SR.NotSupported, typeName, dataNodeInfo.ReaderPosition.Y, dataNodeInfo.ReaderPosition.X, nse.Message);
System\Resources\ResXResourceReader.cs (3)
376string newMessage = string.Format(SR.SerializationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, se.Message); 383string newMessage = string.Format(SR.InvocationException, reader[ResXResourceWriter.TypeStr], pt.Y, pt.X, tie.InnerException?.Message); 400XmlException xmlEx = new(e.Message, e, pt.Y, pt.X);
System\Windows\Forms\ActiveX\AxHost.AxPerPropertyBrowsingEnum.cs (1)
122Debug.Fail($"Failed to build IPerPropertyBrowsing editor. {ex.GetType().Name}, {ex.Message}");
System\Windows\Forms\ActiveX\AxHost.ConnectionPointCookie.cs (1)
53Debug.Fail(ex.Message);
System\Windows\Forms\ActiveX\AxHost.cs (1)
3393Debug.Fail(ex.Message);
System\Windows\Forms\ActiveX\AxHost.PropertyBagStream.cs (3)
39Debug.WriteLine($"PropertyBagStream: {nameof(NrbfDecoder)} failed with {ex.Message}"); 53Debug.Fail($"PropertyBagStream: {nameof(BinaryFormatter)} failed with {inner.Message}"); 114Debug.WriteLine($"PropertyBagStream.Save: {nameof(NrbfDecoder)} failed with {ex.Message}");
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1525Debug.Fail($"Failed to write with BinaryFormatWriter: {ex.Message}");
System\Windows\Forms\ActiveX\Control.ActiveXImpl.PropertyBagStream.cs (1)
39Debug.Fail(e.Message);
System\Windows\Forms\Application.ComponentThreadContext.cs (1)
182Debug.Fail($"Unexpected exception thrown during Dispose: {ex.Message}");
System\Windows\Forms\ComponentModel\COM2Interop\Com2IPerPropertyBrowsingHandler.Com2IPerPropertyBrowsingEnum.cs (1)
152Debug.Fail($"Failed to build IPerPropertyBrowsing editor. {ex.GetType().Name}, {ex.Message}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
652Debug.Fail($"Could not convert the native value to a .NET object: {ex.Message}");
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (1)
812Debug.Fail($"Failed to process type info enum. {ex.Message}");
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (1)
158Debug.Fail(ex.Message);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
16722Debug.Fail($"DataGridView.OnPaint exception: {ex.Message} stack trace {ex.StackTrace}");
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
2109Debug.Fail($"NotifyWinEvent failed: {ex.Message}");
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
1692Debug.Fail($"{nameof(CreatePropertyTab)} failed. {exception.Message}"); 1729Debug.Fail($"Failed to create {nameof(PropertyTab)}. {exception.Message}");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
128ex.Message,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (3)
1101e.Message, 1400Debug.Fail($"Failed to get properties: {e.GetType().Name},{e.Message}\n{e.StackTrace}"); 1444Debug.Fail($"Bad Type Converter! {t.GetType().Name}, {t.Message},{converter}", t.ToString());
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ImmutablePropertyDescriptorGridEntry.cs (1)
76if (string.IsNullOrEmpty(e.Message))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\MultiPropertyDescriptorGridEntry.cs (1)
147Debug.Fail(e.Message);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.ExceptionConverter.cs (1)
27return ex.Message;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.ExceptionEditor.cs (1)
27string message = ex.Message;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (6)
3375Debug.Fail(ex.Message); 3402Debug.Fail(ex.Message); 4952string? exMessage = ex?.Message; 4964exMessage = ex.Message; 5025string? message = ex?.Message; 5037message = ex.Message;
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
2345message = $"{exception.GetType()}: {exception.Message}";
System\Windows\Forms\DataBinding\Binding.cs (1)
601errorText = ex.Message;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (2)
104messageText = w.Message; 116messageText = t.Message;
System\Windows\Forms\Internal\Formatter.cs (2)
390throw new FormatException(ex.Message, ex); 485throw new FormatException(ex.InnerException?.Message, ex.InnerException);
System\Windows\Forms\SystemVisualSettingsTracker.cs (1)
164Debug.Fail($"Unable to query the Windows accent color: {ex.Message}");
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.cs (1)
93ex.Message);
System.Windows.Forms.Design (35)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (1)
121RTLAwareMessageBox.Show(null, string.Format(SR.BinaryEditorFileError, x.Message),
System\ComponentModel\Design\CollectionEditor.CollectionForm.cs (1)
157string message = e.Message;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
46ActionPanel.ShowError(string.Format(SR.DesignerActionPanel_ErrorActivatingDropDown, ex.Message));
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
76ActionPanel.ShowError(string.Format(SR.DesignerActionPanel_ErrorInvokingAction, _methodItem!.DisplayName, Environment.NewLine + ex.Message));
System\ComponentModel\Design\DesignerActionPanel.PropertyLine.cs (1)
85ActionPanel.ShowError(string.Format(SR.DesignerActionPanel_ErrorSettingValue, newValue, PropertyDescriptor.Name, e.Message));
System\ComponentModel\Design\DesignerHost.cs (1)
343string message = e.Message;
System\ComponentModel\Design\DesignSurface.cs (1)
140throw new InvalidOperationException(ex.Message, ex);
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (1)
141sw.WriteLine($"Error during declaration dump: {ex.Message}");
System\ComponentModel\Design\Serialization\CodeDomSerializerException.cs (2)
19public CodeDomSerializerException(Exception? ex, CodeLinePragma? linePragma) : base(ex?.Message, ex) 29public CodeDomSerializerException(Exception? ex, IDesignerSerializationManager manager) : base(ex?.Message, ex)
System\ComponentModel\Design\Serialization\EventMemberCodeDomSerializer.cs (1)
69manager.ReportError(new CodeDomSerializerException(string.Format(SR.SerializerPropertyGenFailed, eventToSerialize.Name, e.Message), manager));
System\ComponentModel\Design\Serialization\PropertyMemberCodeDomSerializer.cs (2)
57manager.ReportError(new CodeDomSerializerException(string.Format(SR.SerializerPropertyGenFailed, property.Name, e.Message), manager)); 123manager.ReportError(new CodeDomSerializerException(string.Format(SR.SerializerPropertyGenFailed, propertyToSerialize.Name, e.Message), manager));
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (1)
255string message = e.Message;
System\Windows\Forms\Design\ChangeToolStripParentVerb.cs (1)
103uiService.ShowError(e.Message);
System\Windows\Forms\Design\CommandSet.CommandSetItem.cs (1)
185_uiService?.ShowError(e, string.Format(SR.CommandSetError, e.Message));
System\Windows\Forms\Design\ComponentTray.cs (1)
834string message = e.Message;
System\Windows\Forms\Design\ControlDesigner.cs (2)
427string message = e.Message; 2505string.Format(SR.ControlDesigner_WndProcException, typeName, exception.Message, stack),
System\Windows\Forms\Design\DataGridViewDesigner.cs (1)
701string message = ex.Message;
System\Windows\Forms\Design\ListViewDesigner.cs (1)
194string message = ex.Message;
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
224exceptionMessage = ex.Message;
System\Windows\Forms\Design\SelectionUIService.cs (1)
128string message = e.Message;
System\Windows\Forms\Design\SplitContainerDesigner.cs (1)
327uiService?.ShowError(ex.Message);
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
224uiService.ShowError(e.Message); 360uiService.ShowError(e.Message);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (5)
1689uiService.ShowError(ex.Message); 1766uiService.ShowError(ex.Message); 1928uiService.ShowError(ex.Message); 2023uiService.ShowError(ex.Message); 2042uiService.ShowError(ex.Message);
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
2450GetService<IUIService>().ShowError(ex.Message);
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
246uiService.ShowError(ex.Message); 611uiService.ShowError(ex.Message);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
806GetService<IUIService>().ShowError(ex.Message);
System.Xaml (6)
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
2200throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.NameScopeException, ex.Message), ex));
System\Xaml\Parser\GenericTypeNameParser.cs (2)
85error = ex.Message; 115error = ex.Message;
System\Xaml\XamlException.cs (3)
45return SR.Format(SR.LineNumberAndPosition, base.Message, LineNumber, LinePosition); 48return SR.Format(SR.LineNumberOnly, base.Message, LineNumber); 51return base.Message;
TypeScriptApiCompat (1)
TypeScriptApiCompatRunner.cs (1)
45Console.Error.WriteLine(ex.Message);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\Accessible.cs (1)
1370Debug.Fail(string.Format(CultureInfo.CurrentCulture, "MsaaNativeProvider: IAccessible threw a COMException: {0}", e.Message));
MS\Internal\AutomationProxies\WinEventTracker.cs (2)
264Debug.Fail("Exception raising event " + eventId + " for prop " + ecp._idProp + " on hwnd " + hwnd + "\n" + e.Message); 309Debug.Fail("Exception raising event " + eventId + " for prop " + ecp._idProp + " on hwnd " + hwnd + "\n" + e.Message);
UnitTests.Common (1)
TestTypes.cs (1)
123this.ErrorMessage = (ex == null) ? "unexpected" : ex.Message;
vbc (4)
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
306return new RejectedBuildResponse($"Error writing build request: {e.Message}"); 331response = new RejectedBuildResponse($"Error reading response: {e.Message}");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'"); 138Debug.Assert(false, e.Message);
VBCSCompiler (17)
src\roslyn\src\Compilers\Server\VBCSCompiler\AnalyzerConsistencyChecker.cs (1)
67errorMessages.Add(e.Message);
src\roslyn\src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
142response = new RejectedBuildResponse($"Exception during compilation: {ex.Message}");
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCache.cs (10)
191logger.Log($"Cache hit restore failed, falling through to compilation: {ex.Message}"); 342logger.Log($"Cache store failed for {dllName} [{hashKey}]: {ex.Message}"); 358logger.Log($"Cache cleanup failed for {dllName} [{hashKey}]: {ex.Message}"); 362logger.Log($"Cache cleanup failed for {dllName} [{hashKey}]: {ex.Message}"); 518logger.Log($"Cache purge: failed to delete {dllName}/{dirName}: {ex.Message}"); 534logger.Log($"Cache purge: failed to remove empty directory {dllName}: {ex.Message}"); 540logger.Log($"Cache purge: error enumerating {cachePath}: {ex.Message}"); 570logger.Log($"Failed to read last-used for {entryDir}: {ex.Message}"); 598logger.Log($"Failed to read created time for {entryDir}: {ex.Message}"); 656logger.Log($"Failed to enumerate cache stats for {cachePath}: {ex.Message}");
src\roslyn\src\Compilers\Server\VBCSCompiler\CompilationCacheUtilities.cs (1)
71logger.Log($"Failed to compute deterministic key, skipping cache: {ex.Message}");
src\roslyn\src\Compilers\Shared\BuildServerConnection.cs (2)
306return new RejectedBuildResponse($"Error writing build request: {e.Message}"); 331response = new RejectedBuildResponse($"Error reading response: {e.Message}");
src\roslyn\src\Compilers\Shared\CompilerServerLogger.cs (2)
83builder.AppendLine($"Exception: '{exception.GetType().Name}' '{exception.Message}' occurred during '{reason}'"); 138Debug.Assert(false, e.Message);
vstest.console (11)
CommandLine\Executor.cs (7)
317Output.Error(false, ex.Message); 323Output.Error(false, ex.Message); 426Output.Error(false, ex.Message); 432!string.Equals(ex.InnerException.Message, ex.Message, StringComparison.CurrentCultureIgnoreCase)) 434Output.Error(false, ex.InnerException.Message); 573EqtTrace.Error(string.Format(CultureInfo.InvariantCulture, "Error: Can't open command line argument file '{0}' : '{1}'", fileName, e.Message));
Processors\CLIRunSettingsArgumentProcessor.cs (1)
117throw new CommandLineException(exception.Message, exception);
Processors\HelpArgumentProcessor.cs (1)
148Output.Warning(false, e.Message);
Processors\ListFullyQualifiedTestsArgumentProcessor.cs (1)
298EqtTrace.Error("TestCaseFilter.ValidateFilter : Filtering failed with exception : " + fe.Message);
Processors\ResultsDirectoryArgumentProcessor.cs (1)
129throw new CommandLineException(string.Format(CultureInfo.CurrentCulture, CommandLineResources.InvalidResultsDirectoryPathCommand, argument, ex.Message));
vstest.console.arm64 (11)
src\vstest\src\vstest.console\CommandLine\Executor.cs (7)
317Output.Error(false, ex.Message); 323Output.Error(false, ex.Message); 426Output.Error(false, ex.Message); 432!string.Equals(ex.InnerException.Message, ex.Message, StringComparison.CurrentCultureIgnoreCase)) 434Output.Error(false, ex.InnerException.Message); 573EqtTrace.Error(string.Format(CultureInfo.InvariantCulture, "Error: Can't open command line argument file '{0}' : '{1}'", fileName, e.Message));
src\vstest\src\vstest.console\Processors\CLIRunSettingsArgumentProcessor.cs (1)
117throw new CommandLineException(exception.Message, exception);
src\vstest\src\vstest.console\Processors\HelpArgumentProcessor.cs (1)
148Output.Warning(false, e.Message);
src\vstest\src\vstest.console\Processors\ListFullyQualifiedTestsArgumentProcessor.cs (1)
298EqtTrace.Error("TestCaseFilter.ValidateFilter : Filtering failed with exception : " + fe.Message);
src\vstest\src\vstest.console\Processors\ResultsDirectoryArgumentProcessor.cs (1)
129throw new CommandLineException(string.Format(CultureInfo.CurrentCulture, CommandLineResources.InvalidResultsDirectoryPathCommand, argument, ex.Message));