diff --git a/ports/windows/msvc/genhdr.targets b/ports/windows/msvc/genhdr.targets
index 3af0ea2636..9ea6ed28cb 100644
--- a/ports/windows/msvc/genhdr.targets
+++ b/ports/windows/msvc/genhdr.targets
@@ -14,6 +14,7 @@
$(PySrcDir)qstrdefs.h
$(DestDir)qstrdefscollected.h
$(DestDir)qstrdefs.generated.h
+ $(MICROPY_CPYTHON3)
python
cl.exe
$([System.IO.Path]::Combine(`$(CLToolPath)`, `$(CLToolExe)`))