|
59 | 59 | </Attribute>
|
60 | 60 | </Attributes>
|
61 | 61 | <Docs>
|
62 |
| - <summary>The exception that is thrown when a path or fully qualified file name is longer than the system-defined maximum length.</summary> |
| 62 | + <summary>The exception that's thrown when a path or fully qualified file name is longer than the system-defined maximum length.</summary> |
63 | 63 | <remarks>
|
64 | 64 | <format type="text/markdown">< in the BCL Team blog. |
68 | 67 |
|
69 | 68 | > [!NOTE]
|
70 |
| -> This exception is not included in [.NET for Windows Store apps](https://go.microsoft.com/fwlink/?LinkID=247912) or the [Portable Class Library](/dotnet/standard/cross-platform/cross-platform-development-with-the-portable-class-library), but it is thrown by some members that are. To catch the exception in that case, write a `catch` statement that handles an <xref:System.IO.IOException> instead. |
| 69 | +> This exception is not included in [.NET for Windows Store apps](https://go.microsoft.com/fwlink/?LinkID=247912) or the [Portable Class Library](/dotnet/standard/cross-platform/cross-platform-development-with-the-portable-class-library), but it is thrown by some members that are. To catch the exception in that case, write a `catch` statement that handles an <xref:System.IO.IOException> instead. |
71 | 70 |
|
72 |
| - Starting with apps running under the .NET Framework 4.6.2, the .NET Framework supports long paths in excess of 260 (or `MAX_PATH`) characters. The conditions under which a <xref:System.IO.PathTooLongException> exception are thrown depend on the version of the .NET Framework that an app targets: |
| 71 | + Starting with apps running under .NET Framework 4.6.2, .NET supports long paths in excess of 260 (or `MAX_PATH`) characters. The runtime throws a <xref:System.IO.PathTooLongException> under the following conditions: |
73 | 72 |
|
74 |
| - **Apps that target the .NET Framework 4.6.2 and later versions** |
75 |
| - Long paths are supported by default. The runtime throws a <xref:System.IO.PathTooLongException> under the following conditions: |
76 |
| -
|
77 |
| -- The operating system returns `COR_E_PATHTOOLONG` or its equivalent. |
78 |
| -
|
79 |
| -- The length of the path exceeds <xref:System.Int16.MaxValue?displayProperty=nameWithType> (32,767) characters. |
80 |
| -
|
81 |
| - **Apps that target the .NET Framework 4.6.1 and earlier versions** |
82 |
| - Long paths are disabled by default, and the legacy behavior is maintained. The runtime throws a <xref:System.IO.PathTooLongException> whenever a path exceeds 260 characters. |
83 |
| -
|
84 |
| - If this is undesirable, apps that target the .NET Framework 4.6.1 and earlier but run under the .NET Framework 4.6.2 can enable long path support by including the following setting in the [\<runtime>](/dotnet/framework/configure-apps/file-schema/runtime/runtime-element) element of the application configuration file: |
85 |
| -
|
86 |
| -```xml |
87 |
| -
|
88 |
| -<runtime> |
89 |
| - <AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false" /> |
90 |
| -</runtime> |
91 |
| -
|
92 |
| -``` |
| 73 | +- The operating system returns `COR_E_PATHTOOLONG` or its equivalent. |
| 74 | +- The length of the path exceeds <xref:System.Int16.MaxValue?displayProperty=nameWithType> (32,767) characters. |
93 | 75 |
|
94 | 76 | <xref:System.IO.PathTooLongException> uses the HRESULT `COR_E_PATHTOOLONG`, which has the value 0x800700CE.
|
95 | 77 |
|
|
0 commit comments