Skip to content

Extend ToStringAnalyzer to detect enum usage in string interpolation #439

Extend ToStringAnalyzer to detect enum usage in string interpolation

Extend ToStringAnalyzer to detect enum usage in string interpolation #439

Triggered via pull request December 18, 2025 19:40
Status Failure
Total duration 4m 4s
Artifacts

BuildAndPack.yml

on: pull_request
Matrix: build-and-test
Publish Tests Results
19s
Publish Tests Results
Fit to window
Zoom out
Zoom in

Annotations

23 errors and 31 warnings
macos
[xUnit.net 00:00:28.63] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.ExternalEnumInStringInterpolationWithFormatShouldHaveDiagnostic [FAIL]
macos
[xUnit.net 00:00:28.42] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumDirectAccessInStringInterpolationShouldHaveDiagnostic [FAIL]
macos
[xUnit.net 00:00:28.33] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationShouldHaveDiagnostic [FAIL]
macos
[xUnit.net 00:00:28.27] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithMultipleExpressionsShouldHaveDiagnostics [FAIL]
macos
[xUnit.net 00:00:27.11] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.ExternalEnumInStringInterpolationShouldHaveDiagnostic [FAIL]
macos
[xUnit.net 00:00:26.58] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.ExternalEnumInStringInterpolationShouldHaveDiagnostic [FAIL]
macos
[xUnit.net 00:00:26.02] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "g") [FAIL]
macos
[xUnit.net 00:00:25.36] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "G") [FAIL]
macos
[xUnit.net 00:00:24.74] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "g") [FAIL]
macos
[xUnit.net 00:00:23.98] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "G") [FAIL]
windows
The strategy configuration was canceled because "build-and-test.macos_macos-15" failed
windows
The operation was canceled.
linux
The strategy configuration was canceled because "build-and-test.macos_macos-15" failed
linux
[xUnit.net 00:00:28.23] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.ExternalEnumInStringInterpolationShouldHaveDiagnostic [FAIL]
linux
[xUnit.net 00:00:28.09] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithMultipleExpressionsShouldHaveDiagnostics [FAIL]
linux
[xUnit.net 00:00:26.36] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "g") [FAIL]
linux
[xUnit.net 00:00:26.20] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "G") [FAIL]
linux
[xUnit.net 00:00:25.10] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.ExternalEnumInStringInterpolationShouldHaveDiagnostic [FAIL]
linux
[xUnit.net 00:00:23.95] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.ExternalEnumInStringInterpolationShouldHaveDiagnostic [FAIL]
linux
[xUnit.net 00:00:23.97] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "g") [FAIL]
linux
[xUnit.net 00:00:23.69] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "G") [FAIL]
linux
[xUnit.net 00:00:22.56] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "g") [FAIL]
linux
[xUnit.net 00:00:22.47] NetEscapades.EnumGenerators.Tests.ToStringAnalyzerTests.EnumInStringInterpolationWithCompatibleFormatShouldHaveDiagnostic(format: "G") [FAIL]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'pt-br'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'pl'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'ko'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'ja'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'it'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'fr'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'es'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'de'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
/Users/runner/.dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'cs'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
macos
Solution "/Users/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators.sln" has active build configurations for the build project. Either enable SuppressBuildProjectCheck on "Build.Solution" or remove the following entries from the solution file: " - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Debug|x64.Build.0 = Debug|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Debug|x86.Build.0 = Debug|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Release|x64.Build.0 = Release|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Release|x86.Build.0 = Release|Any CPU"
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'pt-br'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'pl'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'ko'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'ja'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'it'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'fr'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'es'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'de'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
C:\Program Files\dotnet\sdk\10.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'cs'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\tests\NetEscapades.EnumGenerators.Benchmarks\NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
windows
Solution "D:\a\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators\NetEscapades.EnumGenerators.sln" has active build configurations for the build project. Either enable SuppressBuildProjectCheck on "Build.Solution" or remove the following entries from the solution file: " - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Debug|x64.Build.0 = Debug|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Debug|x86.Build.0 = Debug|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Release|x64.Build.0 = Release|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Release|x86.Build.0 = Release|Any CPU"
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'pt-br'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'pl'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'ko'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'ja'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'it'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'fr'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'es'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'de'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
/usr/share/dotnet/sdk/10.0.101/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): warning NETSDK1188: Package Microsoft.CodeAnalysis.Common 4.0.1 has a resource with the locale 'cs'. This locale is not recognized by .NET. Consider notifying the package author that it appears to be using an invalid locale. [/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/tests/NetEscapades.EnumGenerators.Benchmarks/NetEscapades.EnumGenerators.Benchmarks.csproj::TargetFramework=net10.0]
linux
Solution "/home/runner/work/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators/NetEscapades.EnumGenerators.sln" has active build configurations for the build project. Either enable SuppressBuildProjectCheck on "Build.Solution" or remove the following entries from the solution file: " - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Debug|x64.Build.0 = Debug|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Debug|x86.Build.0 = Debug|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Release|x64.Build.0 = Release|Any CPU - {C4F84B6F-D2AE-4B3D-9CAD-90E6BC71F524}.Release|x86.Build.0 = Release|Any CPU"
Publish Tests Results
Could not find any files for artifacts/**/*.trx