3 ms·
Why path lengths in .NET Framework are limited to 260 characters
- tptacek 16y agoWhen you read this keep in mind that decisions like this are meant to help the vast number of .NET developers in corporate America. This is something Microsoft does very well: they are willing to make compromises to functionality in order to get secure defaults. I can't think of a lot of other companies that do that.
- bediger 16y agotl;dr version: to be compatible with MS-DOS, a system that was detrimentally "parsimonious" with memory.
- CodeMage 16y agoDownvoted for being not only inaccurate, but incorrect as well. There is no such thing as "maximum path length" in DOS. Interrupt 21h, for example, used ASCIIZ path which could be up to 64k long, terminator included (due to how memory was addressed in real mode). I believe that the shell considered the path to be up to 80 characters long, but I could be wrong about that. Had you actually read the article -- which, one hopes, would be a prerequisite for writing a "tl;dr" version -- you would've understood that 260 characters is a limit imposed by Windows API.