I have a C++ QT desktop application built with Visual Studio 2022 version 17.10.5 and Qt 6.7.2.
After making some changes to images used by the application, it started returning this build error:
“QtRunWork” task returned false but did not log an error.
As per usual when obscure errors appear out of nowhere, I restarted Visual Studio and re-loaded the project. Rather than fixing the problem, it became much worse. Every Qt class name was now considered undefined. Every #include line that included a Qt header file was underlined in red and gave an error message indicating that the source file does not exist.
I found that it wasn’t just Qt header files that it no longer recognized the existence of. It would no longer recognize any header files that were in any of the project’s “Additional Include Directories”. It would only recognize header files in the project’s directory, or that were actually included in the project’s list of headers.
I tried reverting my source files and project files to a previous version, uninstalled and reinstalled VS, and remade the project from scratch. The problem kept re-appearing.
user1489589 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.