If you reference the script like that and directly execute the preprocessing steps you need, not as a a pre or post action to something, it should work fine. Maybe check that the current target is “build” (and not Intellisense discovery) for safety as per Extra_scripts seems to be executed when I change GitHub branches in VSCode - #2 by maxgerhardt.