Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The AppContext
switch System.IO.UseNet5CompatFileStream
and the ability to use the legacy FileStream implementation were removed.
The legacy FileStream
implementation was available and you could opt in to it by using the UseNet5CompatFileStream
switch or the DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM
environment variable.
Starting in .NET 7, you can no longer opt in to use the legacy FileStream
implementation.
.NET 7 Preview 1
This change can affect binary compatibility.
The UseNet5CompatFileStream
switch and DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM
environment variable were included in .NET 6 in case the new implementation caused breaking changes. Any breaking changes have now been fixed. Since there are no more bugs introduced by the FileStream
changes, the compatibility mode was removed and with it all the legacy code, which makes the codebase easier to maintain.
If you're currently using the switch (or the DOTNET_SYSTEM_IO_USENET5COMPATFILESTREAM
environment variable) to opt in to legacy code and are upgrading to .NET 7, the switch will no longer have any effect and you should remove it.
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Work with files and directories in a .NET app - Training
Learn how to use .NET, C#, and System.IO to work with directories, paths, files, and the file system.