Base:
property
Message
System.Exception.Message
2 overrides of Message
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (1)
71public override string Message
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (1)
90public override string Message
277 references to Message
Aspire.Hosting.Azure.Tests (1)
AzureWebPubSubExtensionsTests.cs (1)
18Assert.StartsWith("Resource name 'a_b_c' is invalid.", ex.Message);
Aspire.Hosting.Docker.Tests (2)
EnvVarEscaperTests.cs (2)
67Assert.Contains("exceeds maximum allowed length", ex.Message); 76Assert.Contains("exceeds maximum allowed length", ex.Message);
Aspire.Hosting.Python.Tests (4)
PythonPublicApiTests.cs (4)
188exception.Message); 338exception.Message); 527exception.Message); 683exception.Message);
Aspire.Hosting.Testing.Tests (7)
TestingPublicApiTests.cs (7)
64exception.Message); 240exception.Message); 284exception.Message); 328exception.Message); 388exception.Message); 418exception.Message); 462exception.Message);
Aspire.Hosting.Tests (11)
AddParameterTests.cs (2)
178Assert.Equal($"A parameter cannot be both secret and published as a default value. (Parameter 'secret')", ex1.Message); 180Assert.Equal($"A parameter cannot be both secret and published as a default value. (Parameter 'secret')", ex2.Message);
ModelNameTests.cs (9)
17Assert.Equal("Value cannot be null. (Parameter 'name')", exception.Message); 27Assert.Equal($"Resource name '' is invalid. Name must be between 1 and 64 characters long. (Parameter 'name')", exception.Message); 38Assert.Equal($"Resource name '{name}' is invalid. Name must be between 1 and 64 characters long. (Parameter 'name')", exception.Message); 48Assert.Equal("Resource name ' ' is invalid. Name must contain only ASCII letters, digits, and hyphens. (Parameter 'name')", exception.Message); 58Assert.Equal("Resource name 'test_name' is invalid. Name must contain only ASCII letters, digits, and hyphens. (Parameter 'name')", exception.Message); 68Assert.Equal("Resource name '-abc' is invalid. Name must start with an ASCII letter. (Parameter 'name')", exception.Message); 78Assert.Equal("Resource name 'test--name' is invalid. Name cannot contain consecutive hyphens. (Parameter 'name')", exception.Message); 88Assert.Equal("Resource name '1abc' is invalid. Name must start with an ASCII letter. (Parameter 'name')", exception.Message); 98Assert.Equal("Resource name 'abc-' is invalid. Name cannot end with a hyphen. (Parameter 'name')", exception.Message);
Aspire.Microsoft.Azure.Cosmos.Tests (2)
AspireMicrosoftAzureCosmosExtensionsTests.cs (2)
42Assert.Contains("missing", e.Message); 43Assert.Contains("AccountEndpoint", e.Message);
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (2)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (2)
348Assert.Contains("missing", e.Message); 349Assert.Contains("AccountEndpoint", e.Message);
dotnet-openapi (2)
Application.cs (1)
74Error.WriteLine(ex.Message);
Commands\AddFileCommand.cs (1)
67Error.Write(ex.Message);
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
68throw new ToolOptionException(ae.Message);
Microsoft.AspNetCore.Antiforgery.Test (2)
DefaultAntiforgeryTokenGeneratorTest.cs (2)
282Assert.StartsWith(@"The required antiforgery cookie token must be provided.", ex.Message); 303Assert.StartsWith("The required antiforgery request token must be provided.", ex.Message);
Microsoft.AspNetCore.Components.Forms.Tests (2)
FieldIdentifierTest.cs (2)
24Assert.StartsWith("The model must be a reference-typed object.", ex.Message); 166Assert.Equal($"The provided expression contains a NewExpression which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object.", ex.Message);
Microsoft.AspNetCore.Components.Tests (7)
ComponentFactoryTest.cs (1)
39Assert.StartsWith($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", ex.Message);
NavigationManagerTest.cs (2)
63ex.Message); 81ex.Message);
RendererTest.cs (3)
3538Assert.Contains($"There is no event handler associated with this event. EventId: '{eventHandlerId}'.", ex.Message); 4830Assert.Equal($"The renderer does not have a component with ID {rootComponentId}.", ex.Message); 4856Assert.Equal($"The renderer does not have a component with ID {rootComponentId}.", ex.Message);
StackObjectPoolTest.cs (1)
116Assert.Equal("Attempting to return wrong pooled instance. Get/Return calls must form a stack.", ex.Message);
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateFactoryTests.cs (1)
2127Assert.Contains("An item with the same key has already been added. Key: Foo", exception.Message);
Microsoft.AspNetCore.Mvc.Core.Test (3)
ActionResultOfTTest.cs (3)
19Assert.Equal($"Invalid type parameter '{typeof(FileStreamResult)}' specified for 'ActionResult<T>'.", ex.Message); 30Assert.Equal($"Invalid type parameter '{typeof(FileStreamResult)}' specified for 'ActionResult<T>'.", ex.Message); 41Assert.Equal($"Invalid type parameter '{typeof(TestResult)}' specified for 'ActionResult<T>'.", ex.Message);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
TagHelperOutputExtensionsTest.cs (3)
1043var expected = new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue)).Message; 1055Assert.Equal(expected, exceptionAdd.Message); 1056Assert.Equal(expected, exceptionRemove.Message);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (3)
DefaultDisplayTemplatesTest.cs (1)
367Assert.Equal(expectedMessage, ex.Message);
Rendering\HtmlHelperTest.cs (2)
325Assert.Contains(expectedMessage, exception.Message); 346Assert.Contains(expectedMessage, exception.Message);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\HttpUtilities.cs (1)
173throw new InvalidOperationException(ex.Message, ex);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
SniOptionsSelectorTests.cs (1)
331Assert.Equal("An item with the same key has already been added. Key: .EXAMPLE.org (Parameter 'key')", exception.Message);
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
ConfigurationReaderTests.cs (1)
104Assert.Contains(CoreStrings.KeyAlreadyExists, exception.Message);
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
ExceptionMessageExtensions.cs (1)
13var message = argEx.Message;
Microsoft.Build (13)
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
691log.LogWarningWithCodeFromResources(null, projects[i].ItemSpec, 0, 0, 0, 0, "MSBuild.CannotRebaseOutputItemPath", outputItemFromTarget.ItemSpec, e.Message);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
727ProjectErrorUtilities.ThrowInvalidProject(_taskNode.ContinueOnErrorLocation, "InvalidContinueOnErrorAttribute", _taskNode.Name, e.Message);
CommunicationsUtilities.cs (1)
584throw new IOException(String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
Definition\ProjectCollection.cs (1)
355ProjectErrorUtilities.ThrowInvalidProject(ElementLocation.Create("MSBUILD"), "InvalidProperty", ex.Message);
Definition\ToolsetReader.cs (2)
498InvalidToolsetDefinitionException.Throw("ErrorCreatingToolset", toolsVersion.Name, e.Message); 601InvalidToolsetDefinitionException.Throw(ex, "InvalidPropertyNameInToolset", property.Name, property.Source.LocationString, ex.Message);
Evaluation\Evaluator.cs (1)
2516ProjectErrorUtilities.ThrowInvalidProject(importElement.Location, "InvalidAttributeValueWithException", importExpandedWithDefaultPath, XMakeAttributes.project, XMakeElements.import, ex.Message);
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
303ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, loadInfo.AssemblyLocation, e.Message); 454ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, _loadedType.Assembly.AssemblyLocation, e.Message);
Instance\TaskRegistry.cs (1)
419ProjectErrorUtilities.ThrowInvalidProject(projectUsingTaskXml.Location, "InvalidAttributeValueWithException", assemblyFile, XMakeAttributes.assemblyFile, XMakeElements.usingTask, ex.Message);
Logging\DistributedLoggers\DistributedFileLogger.cs (1)
124string message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword(out errorCode, out helpKeyword, "InvalidFileLoggerFile", fileName, e.Message);
Logging\FileLogger.cs (1)
225throw new LoggerException(ex.Message, ex.InnerException, "MSB4128", null);
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
Microsoft.Build.Engine.OM.UnitTests (1)
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
Microsoft.Build.Engine.UnitTests (4)
BackEnd\TaskHostFactory_Tests.cs (1)
58e.Message.ShouldBe($"Process with an Id of {pid} is not running.");
Graph\GraphLoadedFromSolution_tests.cs (1)
49exception.Message.ShouldContain("MSB4261");
NodeStatus_Transition_Tests.cs (1)
33newNodeStatus.ShouldThrow<ArgumentException>().Message.ShouldContain("Target should not contain any escape codes, if you want to colorize target use the other constructor.");
XmlUtilities_Tests.cs (1)
58actual = ex.Message;
Microsoft.Build.Framework (1)
EncodingUtilities.cs (1)
73Debug.Assert(false, "GetEncoding(default OEM encoding) threw an ArgumentException in EncodingUtilities.CurrentSystemOemEncoding! Please log a bug against MSBuild.", ex.Message);
Microsoft.Build.Framework.UnitTests (1)
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
Microsoft.Build.Tasks.CodeAnalysis (1)
ManagedCompiler.cs (1)
854throw new ArgumentException(e.Message, "Sources");
Microsoft.Build.Tasks.Core (29)
AssemblyDependency\ResolveAssemblyReference.cs (1)
2690Log.LogErrorWithCodeFromResources("General.InvalidArgument", e.Message);
AssignCulture.cs (1)
205Log.LogErrorWithCodeFromResources("AssignCulture.CannotExtractCulture", Files[i].ItemSpec, e.Message);
BootstrapperUtil\BootstrapperBuilder.cs (4)
387_results.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyError", setupSourceFile, strOutputExe, ex.Message)); 1060Debug.Fail(ex.Message); 1495_results?.AddMessage(BuildMessage.CreateMessage(BuildMessageSeverity.Error, "GenerateBootstrapper.CopyPackageError", packageFileSource.Value, builder.Name, ex.Message)); 1898Debug.Fail(ex.Message);
CombinePath.cs (1)
75Log.LogErrorWithCodeFromResources("General.InvalidArgument", e.Message);
ConvertToAbsolutePath.cs (1)
71Log.LogErrorWithCodeFromResources("General.InvalidArgument", e.Message);
Copy.cs (1)
878Log.LogErrorWithCodeFromResources("Copy.Error", src, dest, e.Message);
Exec.cs (1)
428Log.LogErrorWithCodeFromResources("Exec.InvalidRegex", regularExpression, ex.Message);
FindAppConfigFile.cs (1)
145Log.LogMessageFromResources(MessageImportance.Low, "FindInList.InvalidPath", item.ItemSpec, ex.Message);
FindInList.cs (1)
121Log.LogMessageFromResources(MessageImportance.Low, "FindInList.InvalidPath", item.ItemSpec, ex.Message);
GenerateResource.cs (4)
2068Log.LogErrorWithCodeFromResources("GenerateResource.InvalidFilename", Sources[i].ItemSpec, e.Message); 2612"General.InvalidResxFile", ae.Message); 2913_logger.LogErrorWithCodeFromResources("GenerateResource.InvalidFilename", filename, ex.Message); 3116_logger.LogWarningWithCodeFromResources(null, name, 0, 0, 0, 0, "GenerateResource.CreatingCultureInfoFailed", e.GetType().Name, e.Message, assemblyName.ToString());
GetReferenceAssemblyPaths.cs (1)
191Log.LogErrorWithCodeFromResources("GetReferenceAssemblyPaths.InvalidTargetFrameworkMoniker", TargetFrameworkMoniker, e.Message);
ManifestUtil\SecurityUtil.cs (1)
489Debug.Fail(String.Format(CultureInfo.CurrentCulture, "PermissionSet.FromXml failed: {0}\r\n\r\n{1}", ex.Message, element.OuterXml));
Move.cs (1)
137Log.LogErrorWithCodeFromResources("Move.Error", SourceFiles[i].ItemSpec, DestinationFolder.ItemSpec, e.Message, string.Empty);
MSBuild.cs (1)
640log.LogWarningWithCodeFromResources(null, projects[i].ItemSpec, 0, 0, 0, 0, "MSBuild.CannotRebaseOutputItemPath", outputItemFromTarget.ItemSpec, e.Message);
RegisterAssembly.cs (2)
122Log.LogErrorWithCodeFromResources("General.InvalidAssemblyName", Assemblies[i], ex.Message); 282Log.LogErrorWithCodeFromResources("RegisterAssembly.CantRegisterAssembly", assemblyPath, e.Message);
ResolveComReference.cs (1)
420Log.LogErrorWithCodeFromResources("General.InvalidArgument", ex.Message);
ResolveKeySource.cs (1)
105Log.LogErrorWithCodeFromResources("ResolveKeySource.InvalidKeyName", KeyFile, ex.Message);
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
SdkToolsPathUtility.cs (1)
86log.LogErrorWithCodeFromResources("General.SdkToolsPathError", toolName, e.Message);
SGen.cs (1)
250Log.LogErrorWithCodeFromResources("SGen.InvalidPath", "BuildAssemblyName", e.Message);
UnregisterAssembly.cs (2)
119Log.LogErrorWithCodeFromResources("General.InvalidAssemblyName", assemblyPath, ex.Message); 185Log.LogErrorWithCodeFromResources("UnregisterAssembly.CantUnregisterAssembly", assemblyPath, e.Message);
Microsoft.Build.Tasks.UnitTests (1)
CommandLineBuilderExtension_Tests.cs (1)
50Assert.Fail("Got an unexpected exception:" + e.Message);
Microsoft.Build.Utilities.Core (2)
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
ToolLocationHelper.cs (1)
1536ErrorUtilities.DebugTraceMessage("TryParsePlatformVersion", "Cannot create FrameworkName object, Exception:{0}", e.Message);
Microsoft.CodeAnalysis (3)
EncodedStringText.cs (1)
112throw new InvalidDataException(e.Message);
FileSystem\FileUtilities.cs (2)
258throw new IOException(e.Message, e); 380throw new ArgumentException(e.Message, paramName);
Microsoft.CodeAnalysis.CodeStyle (4)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
112throw new InvalidDataException(e.Message);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
258throw new IOException(e.Message, e); 380throw new ArgumentException(e.Message, paramName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
68failureReason = $"({nameof(BuiltinOperatorSymbolKey)} failed -> {ex.Message})";
Microsoft.CodeAnalysis.CSharp (1)
Symbols\FileIdentifier.cs (1)
53encoderFallbackErrorMessage = ex.Message;
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
135var result = tree.Diagnostics.Any(d => ex.Message.Contains(d.Message));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (11)
CodeGen\CodeGenTupleTest.cs (11)
5796Assert.Contains(CodeAnalysisResources.TupleElementNameCountMismatch, e.Message); 5801Assert.Contains(CodeAnalysisResources.TupleElementLocationCountMismatch, e.Message); 6284Assert.Contains(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, e.Message); 6297Assert.Contains(CodeAnalysisResources.TupleElementNameEmpty, e.Message); 6298Assert.Contains("elementNames[1]", e.Message); 6315Assert.Contains(CSharpResources.NotACSharpSymbol, e.Message); 6332Assert.Contains(CSharpResources.NotACSharpSymbol, e.Message); 6803Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message); 6843Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message); 6872Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message); 6912Assert.Contains(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, e.Message);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Diagnostics\DiagnosticAnalyzerTests.cs (5)
854string message = new ArgumentException(string.Format(CodeAnalysisResources.UnsupportedDiagnosticReported, AnalyzerReportingUnsupportedDiagnostic.UnsupportedDescriptor.Id), "diagnostic").Message; 912string message = new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticIdReported, AnalyzerWithInvalidDiagnosticId.Descriptor.Id), "diagnostic").Message; 952string message = new ArgumentException(string.Format(CodeAnalysisResources.SupportedDiagnosticsHasNullDescriptor, analyzerFullName), "SupportedDiagnostics").Message; 1015string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, AnalyzerWithInvalidDiagnosticLocation.Descriptor.Id, treeInAnotherCompilation.FilePath), "diagnostic").Message; 1108string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, AnalyzerWithInvalidDiagnosticSpan.Descriptor.Id, badSpan, treeInAnotherCompilation.FilePath), "diagnostic").Message;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
SourceGeneration\AdditionalSourcesCollectionTests.cs (4)
112Assert.Contains(hintName.Replace('\\', '/'), exception.Message); 169Assert.Contains(hintName2, exception.Message); 184Assert.Contains("hintName1", exception.Message); 237Assert.Contains("file5.cs", exception.Message);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
Syntax\SyntaxFactoryTests.cs (3)
156Assert.Contains(typeof(SyntaxFactory).ToString(), e.Message); // Make sure the class/namespace aren't updated without also updating the exception message 167Assert.Contains(typeof(SyntaxFactory).ToString(), e.Message); // Make sure the class/namespace aren't updated without also updating the exception message 178Assert.Contains(typeof(SyntaxFactory).ToString(), e.Message); // Make sure the class/namespace aren't updated without also updating the exception message
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\CodeGenerationTests.cs (2)
261Assert.True(exception != null && exception.Message.StartsWith(expectedMessage, StringComparison.Ordinal), 262string.Format("\r\nExpected exception: {0}\r\nActual exception: {1}\r\n", expectedMessage, exception == null ? "no exception" : exception.Message));
Microsoft.CodeAnalysis.InteractiveHost (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
258throw new IOException(e.Message, e); 380throw new ArgumentException(e.Message, paramName);
Microsoft.CodeAnalysis.Test.Utilities (6)
CompilationVerifier.cs (2)
207pePath = $"<unable to write file: '{pePath}' -- {e.Message}>"; 225pdbPath = $"<unable to write file: '{pdbPath}' -- {e.Message}>";
Diagnostics\CommonDiagnosticAnalyzers.cs (4)
1289Assert.Equal(new ArgumentNullException("operationBlock").Message, ex.Message); 1298Assert.Equal(new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, "operationBlock").Message, ex.Message);
Microsoft.CodeAnalysis.UnitTests (23)
Collections\ImmutableSegmentedDictionaryTest.cs (1)
210Assert.Contains("firstKey", exception.Message);
Diagnostics\OperationTests.cs (18)
158Assert.Equal(new ArgumentException(argumentExceptionMessage, "body").Message, ex.Message); 176Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 194Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 212Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 234Assert.Equal(new ArgumentException(argumentExceptionMessage, "constructorBody").Message, ex.Message); 254Assert.Equal(new ArgumentException(argumentExceptionMessage, "methodBody").Message, ex.Message); 287Assert.Equal(ex.Message, new ArgumentNullException("node").Message); 300Assert.Equal(ex.Message, new ArgumentNullException("semanticModel").Message); 315Assert.Equal(ex.Message, new ArgumentException(CodeAnalysisResources.NotARootOperation, "operation").Message);
SourceFileResolverTest.cs (4)
41Assert.Equal(new ArgumentException(CodeAnalysisResources.NullValueInPathMap, "pathMap").Message, argException.Message); 64Assert.Equal(new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, "baseDirectory").Message, argException.Message);
Microsoft.CodeAnalysis.Workspaces (4)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
112throw new InvalidDataException(e.Message);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
258throw new IOException(e.Message, e); 380throw new ArgumentException(e.Message, paramName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
68failureReason = $"({nameof(BuiltinOperatorSymbolKey)} failed -> {ex.Message})";
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
258throw new IOException(e.Message, e); 380throw new ArgumentException(e.Message, paramName);
Microsoft.Data.Analysis.Tests (1)
DataFrame.IOTests.cs (1)
727Assert.Matches(@"DataFrame already contains a column called Column( \(Parameter 'column'\)|\r\nParameter name: column)", exp.Message);
Microsoft.DotNet.Helix.JobSender.Tests (2)
Payloads\AdHocPayloadTests.cs (2)
17Assert.StartsWith("Names of files to upload have to be distinct. The following name repeats at least once: b.txt", exception.Message); 25Assert.StartsWith("Names of files to upload have to be distinct. The following name repeats at least once: b.txt", exception.Message);
Microsoft.DotNet.Helix.Sdk (3)
HelixTask.cs (3)
76catch (ArgumentException argEx) when (argEx.Message.StartsWith("Helix API does not contain an entry ")) 80Log.LogError(FailureCategory.Build, argEx.Message); 84Log.LogWarning($"{argEx.Message} (FailOnMissingTargetQueue is false, so this is just a warning.)");
Microsoft.Extensions.Caching.Hybrid.Tests (2)
TagSetTests.cs (2)
144Assert.StartsWith("Tags cannot be empty.", ex.Message); 152Assert.StartsWith("The tag '*' is reserved and cannot be used in this context.", ex.Message);
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
KeyPerFileTests.cs (1)
36Assert.Contains("The path must be absolute.", e.Message);
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
DefaultHealthCheckServiceTest.cs (1)
50Assert.StartsWith($"Duplicate health checks were registered with the name(s): Foo, Baz", exception.Message);
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (1)
DependencyInjectionExtensionsTests.cs (1)
38exception.Message);
Microsoft.Extensions.Telemetry.Tests (1)
Http\HttpParserTests.cs (1)
563Assert.StartsWith("A catch-all parameter must be the last segment in the route.", exception.Message);
Microsoft.Gen.Logging.Generated.Tests (1)
LogMethodTests.cs (1)
551Assert.Equal(exception.Message, collector.LatestRecord.Exception!.Message);
Microsoft.JSInterop.Tests (7)
Infrastructure\DotNetDispatcherTest.cs (7)
48Assert.Equal($"There is no loaded assembly with the name '{assemblyName}'.", ex.Message); 70Assert.Equal($"The assembly '{thisAssemblyName}' does not contain a public invokable method with [JSInvokableAttribute(\"{methodIdentifier}\")].", ex.Message); 241Assert.StartsWith("There is no tracked object with id '1'.", ex.Message); 260Assert.StartsWith("There is no tracked object with id '1'.", ex.Message); 544Assert.Contains($"The assembly '{thisAssemblyName}' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")].", ex.Message); 559Assert.Contains($"The type 'GenericType`1' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")].", ex.Message); 593Assert.Equal("The call to 'InvocableStaticWithParams' expects '3' parameters, but received '2'.", ex.Message);
Microsoft.ML.AutoML.Tests (19)
UserInputValidationTests.cs (19)
30Assert.StartsWith("Training data cannot be null", ex.Message); 39Assert.Equal("Provided label column cannot be null", ex.Message); 51Assert.Equal($"Provided label column '{columnName}' not found in training data.", ex.Message); 66ex.Message); 79Assert.Equal("Provided label column 'Label' was of type Boolean, but only type Single is allowed.", ex.Message); 90Assert.Equal("Null column string was specified as numeric in column information", ex.Message); 120Assert.StartsWith("Training data and validation data schemas do not match. Train data has '2' columns,and validation data has '1' columns.", ex.Message); 143Assert.StartsWith("Training data and validation data schemas do not match. Column '1' exists in train data, but not in validation data.", ex.Message); 166Assert.StartsWith("Training data and validation data schemas do not match. Column '1' is of type String in train data, and type Single in validation data.", ex.Message); 174Assert.StartsWith("Provided path cannot be null", ex.Message); 181Assert.StartsWith("File 'idontexist' does not exist", ex.Message); 190Assert.StartsWith("File at path 'empty' cannot be empty", ex.Message); 209Assert.StartsWith("Features column must be of data type Single", ex.Message); 229Assert.Equal("Provided text column 'TextColumn' was of type Single, but only type String is allowed.", ex.Message); 304Assert.StartsWith("Only supported feature column types are Boolean, Single, and String. Please change the feature column UInt64 of type UInt64 to one of the supported types.", ex.Message); 317Assert.StartsWith("Training data has 0 rows", ex.Message); 340Assert.StartsWith("Validation data has 0 rows", ex.Message); 407ex.Message); 422ex.Message);
MSBuild (5)
CommunicationsUtilities.cs (1)
584throw new IOException(String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
XMake.cs (3)
3218CommandLineSwitchException.Throw("InvalidNodeReuseValue", parameters[parameters.Length - 1], ex.Message); 3332CommandLineSwitchException.Throw(resourceName, parameters[parameters.Length - 1], ex.Message); 3372ex.Message);
MSBuildTaskHost (2)
CommunicationsUtilities.cs (1)
584throw new IOException(String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
ResourceUtilities.cs (1)
472ErrorUtilities.ThrowInternalError(e.Message);
PresentationCore (1)
MS\Internal\FontFace\CompositeFontParser.cs (1)
208Fail(x.Message, x);
PresentationFramework.Tests (8)
System\Windows\MessageBox.Tests.cs (8)
20Assert.Contains("button", exception.Message); 32Assert.Contains("button", exception.Message); 46Assert.Contains("defaultResult", exception.Message); 60Assert.Contains("defaultResult", exception.Message); 81Assert.Contains("icon", exception.Message); 102Assert.Contains("icon", exception.Message); 121Assert.Contains("options", exception.Message); 140Assert.Contains("options", exception.Message);
Security.TransportSecurity.IntegrationTests (2)
Https\ClientCredentialTypeTests.4.1.0.cs (2)
202Assert.True(exception.Message.ToLower().Contains(paraMessage), string.Format("Expected exception message to contain: '{0}', actual: '{1}'", paraMessage, exception.Message));
Shared.Tests (11)
Throw\ThrowTest.cs (11)
42Assert.Contains(message, exception.Message, StringComparison.Ordinal); 55Assert.Contains(message, exception.Message, StringComparison.Ordinal); 74Assert.Contains(message, exception.Message, StringComparison.Ordinal); 233Assert.StartsWith("Argument is whitespace", exception.Message); 255Assert.StartsWith("Argument is an empty string", exception.Message); 296Assert.StartsWith("Buffer", exception.Message); 341Assert.StartsWith("Collection is empty", exception.Message); 345Assert.StartsWith("Collection is empty", exception.Message); 349Assert.StartsWith("Collection is empty", exception.Message); 355Assert.StartsWith("Collection is empty", exception.Message); 361Assert.StartsWith("Collection is empty", exception.Message);
System.Data.Common (2)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
513string msg2 = f.Message; 534Debug.Fail($"ParseInternal code vs regex throw mismatch {f.Message}");
System.Data.Odbc (2)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
513string msg2 = f.Message; 534Debug.Fail($"ParseInternal code vs regex throw mismatch {f.Message}");
System.Formats.Nrbf (1)
System\Formats\Nrbf\Utils\BinaryReaderExtensions.cs (1)
168throw new SerializationException(ex.Message, ex);
System.IO.MemoryMappedFiles (1)
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
85throw new IOException(exc.Message, exc);
System.Net.HttpListener (3)
System\Net\HttpListenerRequestUriBuilder.cs (3)
273if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_to_utf8, unicodeString, e.Message)); 323if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_bytes, GetOctetsAsString(_rawOctets), e.Message)); 328if (NetEventSource.Log.IsEnabled()) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_to_utf8, decodedString, e.Message));
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (1)
75string s = base.Message;
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (1)
94string s = base.Message;
System.Private.Windows.Core (1)
System\IO\BinaryReaderExtensions.cs (1)
42throw new SerializationException(ex.Message, ex);
System.Security.Cryptography (1)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
310throw new CryptographicException(ex.Message, ex);
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
310throw new CryptographicException(ex.Message, ex);
System.Windows.Forms.Design (2)
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (1)
361Debug.Assert(false, e.Message);
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
669getPropsError = e.Message;
System.Windows.Forms.Design.Tests (1)
System\Windows\Forms\Design\ListControlStringCollectionEditorTests.cs (1)
66exception.Message.Should().Be(SR.DataSourceLocksItems);
System.Windows.Forms.Primitives.Tests (9)
System\Windows\Forms\Internals\ArgumentValidationTests.cs (6)
39Assert.StartsWith(message, exception.Message); 50Assert.StartsWith(message, exception.Message); 170Assert.StartsWith(message, exception.Message); 180Assert.StartsWith(message, exception.Message); 197Assert.StartsWith(message, exception.Message); 207Assert.StartsWith(message, exception.Message);
Windows\Win32\System\Com\SafeArrayScopeTests.cs (3)
74Assert.Equal(message, e.Message); 79Assert.Equal(message, e.Message); 94Assert.Equal("Wanted SafeArrayScope<System.String> but got SAFEARRAY with VarType=VT_INT", e.Message);
System.Windows.Forms.Tests (2)
System\Resources\ResXResourceReaderTests.cs (2)
195Assert.Contains($"ResX file Type {unknownType} in the data", exception.Message); 220Assert.Contains($"ResX file {testValue} is not a valid value for Int32", exception.Message);