diff --git a/cmd/build-codeql.ts b/cmd/build-codeql.ts
index 999483ce10d..293bf57969b 100644
--- a/cmd/build-codeql.ts
+++ b/cmd/build-codeql.ts
@@ -22,7 +22,7 @@ async function main() {
const { msbuildPath } = detectVisualStudio();
const slnPath = join("vs2022", "SumatraPDF.sln");
- await runLogged(msbuildPath, [slnPath, `/t:SumatraPDF:Rebuild`, `/p:Configuration=Release;Platform=x64`, `/m`]);
+ await runLogged(msbuildPath, [slnPath, `/t:SumatraPDF-dll;SumatraPDF`, `/p:Configuration=Release;Platform=x64`, `/m`]);
await revertBuildConfig();
diff --git a/vs2022/SumatraPDF.vcxproj b/vs2022/SumatraPDF.vcxproj
index 696c433c017..bdda705b66a 100644
--- a/vs2022/SumatraPDF.vcxproj
+++ b/vs2022/SumatraPDF.vcxproj
@@ -1218,6 +1218,7 @@
+