Skip to content

Commit c21ed31

Browse files
committed
GVFS.Payload: drop VS code-analysis marker files from payload
Visual Studio's MSBuild for native C++ projects emits a <binary>.exe.lastcodeanalysissucceeded marker file next to each produced executable to record that PREfast / code analysis ran successfully on it. Those marker files are pure build-time bookkeeping with no runtime purpose, but the GVFS.Payload layout step xcopies the entire native bin\x64\<Config>\ folder for each of GitHooksLoader, GVFS.PostIndexChangedHook, GVFS.ReadObjectHook and GVFS.VirtualFileSystemHook -- so the markers end up in the Payload, get packaged into SetupGVFS.exe, and finally land on end-user machines as e.g. GitHooksLoader.exe.lastcodeanalysissucceeded in 'C:\Program Files\VFS for Git\'. Extend the existing layout.bat cleanup block (which already strips *.runtimeconfig.json, *.deps.json, and orphaned managed PDBs) to also recursively delete *.lastcodeanalysissucceeded from the output directory so they're never shipped. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent 0f30e3d commit c21ed31

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

GVFS/GVFS.Payload/layout.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ RMDIR /S /Q %OUTPUT%\x86
5959
REM Remove stray managed artifacts (AOT binaries don't need these)
6060
DEL /Q %OUTPUT%\*.runtimeconfig.json 2>nul
6161
DEL /Q %OUTPUT%\*.deps.json 2>nul
62+
REM Remove VS C++ code-analysis marker files generated next to native exes
63+
DEL /S /Q %OUTPUT%\*.lastcodeanalysissucceeded 2>nul
6264
REM Remove orphaned managed PDBs (these libraries are compiled into AOT exes)
6365
DEL /Q %OUTPUT%\GVFS.Common.pdb 2>nul
6466
DEL /Q %OUTPUT%\GVFS.Platform.Windows.pdb 2>nul

0 commit comments

Comments
 (0)