Solved Qt 5.15.12 on Visual Studio - getting rebuild when code is up to date
-
Windows 11, Visual Studio 2019
Visual Studio using MS C++ is doing a full rebuild of projects even when code is up to date. I turned on full diagnostics for the output and see that file qtvars_x64_Release.props is showing as updated every time time I select build. This happened when I updated to Qt 5.15.12 to be consistent with all of our developers. It is making the build system unusable with 30+ minute build times every time we want to make any change or run the code for debugging.
-
15.15.12 is not yet open-source so please ask your qt commercial support.
-
@dherold said in Qt 5.15.12 on Visual Studio - getting rebuild when code is up to date:
MS C++ is doing a full rebuild of projects even when code is up to date.
I guess it is more a VS issue than Qt related problem.
Project settings: Check your project settings and make sure that incremental builds are enabled. You can find this option in the project's properties under "Configuration Properties" > "General" > "Configuration Type". Third-party libraries: Make sure that all third-party libraries and headers are up-to-date and do not have any version mismatch issues. Incorrect dependencies: Make sure that the dependencies of your project are correctly set and not causing the full rebuild. Cache corruption: Delete the Visual Studio cache files to fix any corruption issues. You can find the cache files in the folder "C:\Users<user>\AppData\Local\Microsoft\VisualStudio<version>\ComponentModelCache". MSBuild.exe: Try cleaning and rebuilding the solution using the "MSBuild.exe" command line utility. This can help to identify if there's any issue with the MSBuild process.
-
My colleague is using Visual Studio projects. I remember that for qmake-based projects there is a setting that for a specific number of moc files (or was it ui files?) qmake will put all of the filename into a file instead of providing them as separate command line arguments (there used to be a low limit for VS). Somehow this triggers moc in every build.
Unfortunately, I don't remember the file (inside the Qt directory) where this limit is set. Does this ring a bell for somebody else?
I would expect that this problem is gone with CMake projects.
-
Windows 11, Visual Studio 2019
Visual Studio using MS C++ is doing a full rebuild of projects even when code is up to date. I turned on full diagnostics for the output and see that file qtvars_x64_Release.props is showing as updated every time time I select build. This happened when I updated to Qt 5.15.12 to be consistent with all of our developers. It is making the build system unusable with 30+ minute build times every time we want to make any change or run the code for debugging.
I tried various things over the past week to resolve this. Finally this morning, I uninstalled the most current QT VS plugin, turned off auto updates for it, and went back to this version of the plugin :
qt-vsaddin-msvc2022-2.8.1-rev.06.vsix
and the continuous full rebuilds quit happening immediately after the first build. The 2.10.x version of the plugin is causing a file to be updated - I think it is file qtvars_x64_Release.props but do not have time to confirm that.
-
I tried various things over the past week to resolve this. Finally this morning, I uninstalled the most current QT VS plugin, turned off auto updates for it, and went back to this version of the plugin :
qt-vsaddin-msvc2022-2.8.1-rev.06.vsix
and the continuous full rebuilds quit happening immediately after the first build. The 2.10.x version of the plugin is causing a file to be updated - I think it is file qtvars_x64_Release.props but do not have time to confirm that.
@dherold Thanks very much. This resolved an issue I had been having with QT and Visual studio 2022. Rebuilding all files even if only one file had been changed. Went back to the version extension of QT and all is fine now. Originally thought it had to do with an update to Visual. Much appreciated!!