Visual studio 2022 project never up-to-date after build

Hi all,

I am trying to build Slicer for Windows 10 with Visual Studio Community 2022 version 17.2.6, after configuring it in CMake 3.23.2 with Qt 5.15.2, according to the directions here

The build for target ALL_BUILDS succeeds initially, and I’m able to run Slicer.

However, when I build for a second time, with no changes to the code, with no intervening clean, and with build (rather than rebuild), almost every component is reported to be “not up-to-date”, and is recompiled in its entirety.

This is a problem, since it takes quite a while to recompile every component of Slicer.

Does anyone know why that’s happening and how to fix it?

I tried to figure out why this is happening by setting Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity = “Diagnostic” in Visual Studio and and running the build again. The first few lines of the output from the build are below:

Build started…
1>------ Up-To-Date check: Project: ZERO_CHECK.vcxproj, Configuration: Debug x64 ------
1>All outputs are up-to-date.
1>Time Elapsed 6 ms
2>------ Up-To-Date check: Project: zlib.vcxproj, Configuration: Debug x64 ------
2>Project is not up-to-date: build input ‘d:\d\s5r\zlib-prefix\src\zlib-stamp\debug\zlib-update’ is missing.
2>------ Build started: Project: zlib, Configuration: Debug x64 ------
3>------ Up-To-Date check: Project: vtkAddon.vcxproj, Configuration: Debug x64 ------
3>Project is not up-to-date: build input ‘d:\d\s5r\vtkaddon-prefix\src\vtkaddon-stamp\debug\vtkaddon-update’ is missing.
3>------ Build started: Project: vtkAddon, Configuration: Debug x64 ------
4>------ Up-To-Date check: Project: tbb.vcxproj, Configuration: Debug x64 ------
4>Project is not up-to-date: build output ‘d:\d\s5r\cmakefiles\tbb’ is missing
4>------ Build started: Project: tbb, Configuration: Debug x64 ------
5>------ Up-To-Date check: Project: sqlite.vcxproj, Configuration: Debug x64 ------
5>Project is not up-to-date: build input ‘d:\d\s5r\sqlite-prefix\src\sqlite-stamp\debug\sqlite-update’ is missing.
5>------ Build started: Project: sqlite, Configuration: Debug x64 ------
6>------ Up-To-Date check: Project: qRestAPI.vcxproj, Configuration: Debug x64 ------
6>Project is not up-to-date: build input ‘d:\d\s5r\qrestapi-prefix\src\qrestapi-stamp\debug\qrestapi-update’ is missing.
6>------ Build started: Project: qRestAPI, Configuration: Debug x64 ------
7>------ Up-To-Date check: Project: python-source.vcxproj, Configuration: Debug x64 ------
7>Project is not up-to-date: build output ‘d:\d\s5r\cmakefiles\python-source’ is missing
7>------ Build started: Project: python-source, Configuration: Debug x64 ------
8>------ Up-To-Date check: Project: bzip2.vcxproj, Configuration: Debug x64 ------
8>Project is not up-to-date: build input ‘d:\d\s5r\bzip2-prefix\src\bzip2-stamp\debug\bzip2-update’ is missing.

Many of these files are in fact missing when I look for them in the filesystem. I read that there can be issues with case sensitivity of paths in Windows, but I don’t think that’s the issue here since my build directory is not case sensitive:

fsutil.exe file queryCaseSensitiveInfo D:\D\S5R
Case sensitive attribute on directory D:\D\S5R\ is disabled.

Thanks for any input on this topic!

Once the superbuild is complete, could you work only in the inner build? If you’re modifying Slicer source code, then that’s the way to go.

Thanks! I didn’t realize there was an inner build, but I see that in the instructions now.