Skip to content

<experimental/filesystem> usage will fail to compile with MSVC Build Tools 14.51 #296

@StephanTLavavej

Description

@StephanTLavavej

(I'm the primary maintainer of MSVC's STL.)

The MSVC team regularly builds popular open-source projects, including yours, with development versions of the compiler and libraries, in order to find and fix regressions before they can ship and cause trouble for you. This also allows us to provide advance notice of breaking changes, which is the case here.

MSVC's old <experimental/filesystem> header, which implemented the Filesystem TS and was full of bugs and limitations (notably MAX_PATH limitations), has been deprecated since VS 2019 16.3 in September 2019. al-khaser is suppressing the deprecation warning (which explicitly noted that the header would be removed in the future):

#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
#include <experimental/filesystem>

That time has come. In the MSVC Build Tools 14.51, which will ship in a future update to VS 2026, I have permanently removed the <experimental/filesystem> header with microsoft/STL#5765 . This will cause your project to fail to compile.

Fortunately, migrating to Standard C++17 <filesystem> in the std::filesystem namespace is generally easy if your usage is minimal, which it appears to be. Switching over the header and namespace usage is generally sufficient. As a bonus, this will make your project more portable to other platforms if you ever choose to do so in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions