Summary
On current origin/main, full dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj reaches the trimmed publish tests and fails because the test-internal dotnet publish treats IL3050 AOT analyzer diagnostics as errors.
Observed failing test:
CodeIndex.Tests.QueryCommandRunnerTests.RunPublishedTrimmedCli_SerializesQueryJsonAndErrorJson
Representative diagnostics include ActiveWorkspace.cs, WorkspaceCommandRunner.cs, CdidxConfigFile.cs, SuggestionStore.cs, McpServer.cs, and other JSON serialization call sites using APIs annotated with RequiresDynamicCodeAttribute.
Repro
dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj /p:WarningsNotAsErrors=IL2026%3BIL2067%3BIL2072%3BIL2075%3BIL3050
The outer test build can be made to continue by demoting IL3050, but the test-internal trimmed dotnet publish still fails on IL3050.
Notes
This was found while validating unrelated issue fixes and is not part of that implementation scope.
Summary
On current origin/main, full
dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csprojreaches the trimmed publish tests and fails because the test-internaldotnet publishtreats IL3050 AOT analyzer diagnostics as errors.Observed failing test:
CodeIndex.Tests.QueryCommandRunnerTests.RunPublishedTrimmedCli_SerializesQueryJsonAndErrorJsonRepresentative diagnostics include
ActiveWorkspace.cs,WorkspaceCommandRunner.cs,CdidxConfigFile.cs,SuggestionStore.cs,McpServer.cs, and other JSON serialization call sites using APIs annotated withRequiresDynamicCodeAttribute.Repro
dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj /p:WarningsNotAsErrors=IL2026%3BIL2067%3BIL2072%3BIL2075%3BIL3050The outer test build can be made to continue by demoting IL3050, but the test-internal trimmed
dotnet publishstill fails on IL3050.Notes
This was found while validating unrelated issue fixes and is not part of that implementation scope.