Getting errors while building Slicer 5.6.2 using Visual Studio 2022

kiran
Mon, 22 Sep 2025 20:52:36 +0000
SlicerDMRI

Hi all,

I’m trying to build Slicer 5.6.2 from source on Windows 10 using Visual Studio 2022 (CMake 3.29.2, Ninja/VS generator). The CMake configure step completes successfully — all dependencies are found and I see SuperBuild - Slicer[OK].

However, when I try to build the Slicer target, the build fails with this error:
error code MSB8066
Custom build for ‘C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-mkdir.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-download.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-update.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-patch.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-configure.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-build.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-forceconfigure.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\3a1e9347e5c691c76dc8fd672ddc792e\Slicer-install.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\c5da1549ecc272d07054fb076acf0418\Slicer-complete.rule;C:\Users\Admin\Slicer-5.6.2-build\CMakeFiles\f26948234eae581a147caa198a7bd78d\Slicer.rule;C:\Users\Admin\Slicer-5.6.2\CMakeLists.txt’ exited with code 1.

Unfortunately, the error message is not very informative.

Things I’ve checked so far:

CMake configure succeeds, reports all dependencies [OK]

Qt 5.15.2 is installed and found

Python and OpenSSL are found

No clear error appears in the Visual Studio output

Questions:

1. Where should I look for the real error logs? (e.g. in Slicer-prefix/src/Slicer-stamp/…)

2. Has anyone seen this MSB8066 exit code 1 issue on Windows builds recently?

3. Since my goal is to use Slicer libraries in my own project (not necessarily build the entire SuperBuild), would you recommend building only selected parts, or linking directly against the official Slicer binaries instead?

1 post - 1 participant