Refused JSON contracts built by reflection and checked all of them in the trimmed build (#1152)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-03 18:29:50 +01:00
1 parent f864359290
commit 0b42c0288e
23 files changed
+535 -99

No files matched your search

+9
View File
@@ -94,6 +94,15 @@ public sealed class VerifyCommand
var directory = Environment.GetTrimSmokeTestDirectory();
var publishDirectory = Path.Combine(directory, "bin", "verify");
//
// Publishing leaves the files of an earlier run in place, among them copies of assemblies which the trimmer
// now removes completely. The dependency manifest still lists such an assembly, so a leftover copy can be
// loaded in its place and hide exactly what the smoke test is there to find:
//
if (Directory.Exists(publishDirectory))
Directory.Delete(publishDirectory, recursive: true);
var publishExitCode = await CommandRunner.RunAsync(directory, "dotnet", $"publish --configuration release --runtime {rid.AsMicrosoftRid()} --output \"{publishDirectory}\" --nologo");
if (publishExitCode is not 0)
return publishExitCode;