# Error MSB3491, filename has more than 260 characters

**URL:** <https://discourse.slicer.org/t/error-msb3491-filename-has-more-than-260-characters/49145>\
**Category:** Development\
**Created:** [November 27, 2026, 5:31pm UTC](https://discourse.slicer.org/t/error-msb3491-filename-has-more-than-260-characters/49145 "2026-11-27T17:31:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [November 27, 2026, 5:31pm UTC](https://discourse.slicer.org/t/error-msb3491-filename-has-more-than-260-characters/49145/1 "2026-11-27T17:31:45Z")

</div>

Hi,

It’s the first time in a few years that I’m building Slicer on Windows. I did a release build according to latest documentation but I get:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/1/51a769d2140a5b3d92985ac7757c36b743769f0e.png)

(6 files have too long names)

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [November 28, 2026, 1:07am UTC](https://discourse.slicer.org/t/error-msb3491-filename-has-more-than-260-characters/49145/2 "2026-11-28T01:07:23Z")

</div>

I ran into it during a packaging step on Windows. See written GitHub issue below where you can provide your observations as well.

> <https://github.com/Slicer/Slicer/issues/9586>
>
> \## Summary
> 
> With environment Visual Studio 2026 (18.12.0), CMake 4.5.0, Qt 6.11.…3 and building Slicer as of https://github.com/Slicer/Slicer/commit/b48ed846855eccca1dc695dd2eed6e806c69be2f, I observed some errors during the packaging step
> 
> \`\`\`
> 454\>C:\\Program Files\\Microsoft Visual Studio\\18\\Professional\\MSBuild\\Microsoft\\VC\\v180\\Microsoft.CppBuild.targets(358,5): error MSB3501: Could not read lines from file "x64\\Release\\qSlicerTransformsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerT.0D765B61.tlog\\qSlicerTransformsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate". Could not find a part of the path 'C:\\S5R\\Slicer-build\\Modules\\Loadable\\Transforms\\SubjectHierarchyPlugins\\x64\\Release\\qSlicerTransformsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerT.0D765B61.tlog\\qSlicerTransformsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate'.
> 463\>C:\\Program Files\\Microsoft Visual Studio\\18\\Professional\\MSBuild\\Microsoft\\VC\\v180\\Microsoft.CppBuild.targets(358,5): error MSB3501: Could not read lines from file "x64\\Release\\qSlicerSegmentationsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerS.13F809CD.tlog\\qSlicerSegmentationsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate". Could not find a part of the path 'C:\\S5R\\Slicer-build\\Modules\\Loadable\\Segmentations\\SubjectHierarchyPlugins\\x64\\Release\\qSlicerSegmentationsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerS.13F809CD.tlog\\qSlicerSegmentationsSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate'.
> 504\>C:\\Program Files\\Microsoft Visual Studio\\18\\Professional\\MSBuild\\Microsoft\\VC\\v180\\Microsoft.CppBuild.targets(358,5): error MSB3501: Could not read lines from file "x64\\Release\\qSlicerVolumeRenderingSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerV.95CA0B59.tlog\\qSlicerVolumeRenderingSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate". Could not find a part of the path 'C:\\S5R\\Slicer-build\\Modules\\Loadable\\VolumeRendering\\SubjectHierarchyPlugins\\x64\\Release\\qSlicerVolumeRenderingSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerV.95CA0B59.tlog\\qSlicerVolumeRenderingSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate'.
> 506\>C:\\Program Files\\Microsoft Visual Studio\\18\\Professional\\MSBuild\\Microsoft\\VC\\v180\\Microsoft.CppBuild.targets(358,5): error MSB3501: Could not read lines from file "x64\\Release\\qSlicerDynamicModelerSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerD.F37E2B52.tlog\\qSlicerDynamicModelerSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate". Could not find a part of the path 'C:\\S5R\\Slicer-build\\E\\SurfaceToolbox\\DynamicModeler\\SubjectHierarchyPlugins\\x64\\Release\\qSlicerDynamicModelerSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps\\qSlicerD.F37E2B52.tlog\\qSlicerDynamicModelerSubjectHierarchyPluginsPythonQt\_autogen\_timestamp\_deps.lastbuildstate'.
> \`\`\`
> These occurred because the reference path was greater than 260 characters long. I would otherwise have to manually enable \`\[longPathAware\`\](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later).
> 
> Slicer currently does a check of using a 40 character limit to pre-determine if there will be a max path length issue, however it isn't alerting about this current case.
> https://github.com/Slicer/Slicer/blob/b48ed846855eccca1dc695dd2eed6e806c69be2f/CMakeLists.txt#L148-L153
> 
> Note that my build tree was a short "C:/S5R" per the recommendation in the Slicer documentation and it can't really get any shorter to accommodate the long file path issues during packaging on Windows.
> 
> @lassoan Have you run into this locally on Windows when doing the package step with the mentioned build tools?
