diff --git a/csharp/ql/lib/change-notes/2025-12-03-run-tracer-after-compilation.md b/csharp/ql/lib/change-notes/2025-12-03-run-tracer-after-compilation.md new file mode 100644 index 00000000000..d7dd475cb0b --- /dev/null +++ b/csharp/ql/lib/change-notes/2025-12-03-run-tracer-after-compilation.md @@ -0,0 +1,4 @@ +--- +category: fix +--- +* Fixed an issue where compiler-generated files were not being extracted. The extractor now runs after compilation completes to ensure all generated files are properly analyzed. diff --git a/csharp/tools/tracing-config.lua b/csharp/tools/tracing-config.lua index 13ede12a237..94cc4fabc16 100644 --- a/csharp/tools/tracing-config.lua +++ b/csharp/tools/tracing-config.lua @@ -183,7 +183,7 @@ function RegisterExtractorPack(id) MsBuildMatcher, CreatePatternMatcher({ '^csc.*%.exe$' }, MatchCompilerName, extractor, { prepend = { '--compiler', '"${compiler}"' }, - order = ORDER_BEFORE + order = ORDER_AFTER }), CreatePatternMatcher({ '^fakes.*%.exe$', 'moles.*%.exe' }, MatchCompilerName, nil, { trace = false }), @@ -224,7 +224,7 @@ function RegisterExtractorPack(id) CreatePatternMatcher({ '^mcs%.exe$', '^csc%.exe$', '^csc$' }, MatchCompilerName, extractor, { prepend = { '--compiler', '${compiler}' }, - order = ORDER_BEFORE + order = ORDER_AFTER }), MsBuildMatcher, function(compilerName, compilerPath, compilerArguments, _languageId)