Skip to content

Conversation

@drewnoakes
Copy link
Member

When targeting .NET Framework, some commonly-used System.IO classes have worse performance than in .NET. They are also not null-annotated, which can allow bugs to slip through undetected.

This change uses a global alias across the solution so that Path and Directory types come from the newer Microsoft.IO package/assembly. This gives us a reduction in allocations, access to newer methods (like Path.Join), and correct null annotations.

All other changes here are in response to the user of the newer package, mostly around handling null values correctly.

@drewnoakes drewnoakes requested a review from a team as a code owner December 7, 2025 10:41
When targeting .NET Framework, some commonly-used System.IO classes have
worse performance than in .NET. They are also not null-annotated, which
can allow bugs to slip through undetected.

This change uses a global alias across the solution so that Path and
Directory types come from the newer Microsoft.IO package/assembly. This
gives us a reduction in allocations, access to newer methods (like
Path.Join), and correct null annotations.

All other changes here are in response to the user of the newer package,
mostly around handling null values correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant