Ever since I switched to Windows 11 a few months ago, whenever I tried to use idf.py from the IDF terminal in VSCode, I would get the following error:
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Apps > Advanced app settings > App execution aliases.
Yesterday, I finally followed those instructions, and immediatley the terminal started working. However, now I can't build via the VSCode extension:
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.50.0.windows.2")
-- Component directory C:/Users/squire/esp/v5.4.1/esp-idf/components/build does not contain a CMakeLists.txt file. No component will be added
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
Restoring the settings in App execution aliases didn't fix it. Deleting the build folder didn't fix it. I've also tried rebooting, I've reinstalled IDF, and I've compared settings with my colleagues. No change. I can build from the IDF terminal by calling
idf.py build. After building from terminal I can use the build task again, but it fails with
Executing task: C:\Users\squire\.espressif\tools\ninja\1.12.1\ninja.EXE
[1/130] Building CXX object esp-idf/ui/CMakeFiles/__idf_ui.dir/ui_img_manager_custom.cpp.obj
FAILED: esp-idf/ui/CMakeFiles/__idf_ui.dir/ui_img_manager_custom.cpp.obj
ccache C:\Users\squire\.espressif\tools\xtensa-esp-elf\esp-14.2.0_20241119\xtensa-esp-elf\bin\xtensa-esp32s3-elf-g++.exe -DESP_PLATFORM -DIDF_VER=\"v5.4.1-dirty\" -DLV_CONF_INCLUDE_SIMPLE -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DMD5_ENABLED=1 -DSERIAL_FLASHER_BOOT_HOLD_TIME_MS=50 -DSERIAL_FLASHER_BOOT_INVERT=false -DSERIAL_FLASHER_DEBUG_TRACE=false -DSERIAL_FLASHER_INTERFACE_UART -DSERIAL_FLASHER_RESET_HOLD_TIME_MS=1000 -DSERIAL_FLASHER_RESET_INVERT=false -DSERIAL_FLASHER_WRITE_BLOCK_RETRIES=3 -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DSOC_XTAL_FREQ_MHZ=CONFIG_XTAL_FREQ -D_GLIBCXX_HAVE_POSIX_SEMAPHORE -D_GLIBCXX_USE_POSIX_SEMAPHORE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -IC:/Repos/Project/build/config -IC:/Repos/Project/components/ui -IC:/Repos/Project/components/ui/src -IC:/Users/squire/esp/v5.4.1/esp-idf/components/newlib/platform_include -IC:/Users/squire/esp/v5.4.1/esp-idf/components/freertos/config/include [lots more files] -mlongcalls -fno-builtin-memcpy -fno-builtin-memset -fno-builtin-bzero -fno-builtin-stpcpy -fno-builtin-strncpy -w -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-error=extra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -mdisable-hardware-atomics -O2 -fstack-protector-all -fmacro-prefix-map=C:/Repos/Project=. -fmacro-prefix-map=C:/Users/squire/esp/v5.4.1/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -Wno-format-nonliteral -Wno-format-security -Wno-maybe-uninitialized -Wno-unused-variable -Wno-unused-function -Wformat=0 -std=gnu++2b -fno-exceptions -fno-rtti -fuse-cxa-atexit -MD -MT esp-idf/ui/CMakeFiles/__idf_ui.dir/ui_img_manager_custom.cpp.obj -MF esp-idf\ui\CMakeFiles\__idf_ui.dir\ui_img_manager_custom.cpp.obj.d -o esp-idf/ui/CMakeFiles/__idf_ui.dir/ui_img_manager_custom.cpp.obj -c C:/Repos/Project/components/ui/ui_img_manager_custom.cpp
CreateProcess failed: The system cannot find the file specified.
I am at a complete loss and would appreciate some help solving this.