Issue
I am not able to build a Qt application using MSBUILD and Qt VS Tools on Jenkins. I have created a dummy Qt application using Visual Studio (new project -> Qt -> Qt Widget Application) (https://github.com/ThomArmax/dummy-qtvstool260-test-app) which I can build and run on my desktop. But I can make it build on my Jenkins server.
Context
- Visual Studio 2017 15.9.14
- Qt 5.12.8 msvc2017 64 bits
- Qt VS tools 2.6.0
Here is my Jenkins build script
set QTDIR=%QTMSVC2017_64%
%MSBUILD_VS2017% /t:rebuild /p:Platform=x64 /p:Configuration=Release QtWidgetsApplication1.sln
And the build output
dummy-qtvstool260-test-app\qtwidgetsapplication1\stdafx.h(1): fatal error C1083:'QtWidgets.h: No such file or directory
I have tried with different Qt version. Of course, I can manually add the necessary include paths, but I guess that should not be necessary. More over, it does not guaranty that I won't have other issues. I suspect a Qt Vs Tool issue.
I have also tried to define the QtMsBuild
env variable to %LOCALAPPDATA%\QtMsBuild
without success.
Does any of you guys had the same issue ?
Thanks by advance
Solution
Ok, I have figured out why. Fist, on the server, the QtMsBuild was not updated ... Then we used the amd64 version of MSBUILD, if I use the 32 bits version, it works fine ! See https://bugreports.qt.io/browse/QTVSADDINBUG-828
Answered By - Thom Armax