Skip to content

WriteFileToTempFolder: .NET 10, temp directory and DeleteOnClose examples - #2331

Merged
vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104001-csharp-how-to-create-a-temp-file-in-temp-folder
Oct 26, 2026
Merged

vladimir-pecanac-main merged 2 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/104001-csharp-how-to-create-a-temp-file-in-temp-folder

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves both projects in files-csharp/WriteFileToTempFolder to net10.0 and updates the test packages (Microsoft.NET.Test.Sdk 18.11.0, xunit 2.9.3, xunit.runner.visualstudio 4.0.1, coverlet.collector 10.1.0). The special folder example now uses LocalApplicationData instead of the roaming ApplicationData, the GetTempPath example gets a missing space, and Program.cs gains two examples for the updated article: a temp directory from Directory.CreateTempSubdirectory() and a file opened with FileOptions.DeleteOnClose. Two new tests cover both.

@vladimir-pecanac-main
vladimir-pecanac-main merged commit d1ee56d into CodeMazeBlog:main Oct 26, 2026
4 checks passed
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