Meziantou.Framework.TemporaryDirectory
3.0.9
Prefix Reserved
dotnet add package Meziantou.Framework.TemporaryDirectory --version 3.0.9
NuGet\Install-Package Meziantou.Framework.TemporaryDirectory -Version 3.0.9
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.TemporaryDirectory" Version="3.0.9" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.TemporaryDirectory" Version="3.0.9" />
<PackageReference Include="Meziantou.Framework.TemporaryDirectory" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.TemporaryDirectory --version 3.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.TemporaryDirectory, 3.0.9"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.TemporaryDirectory@3.0.9
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.TemporaryDirectory&version=3.0.9
#tool nuget:?package=Meziantou.Framework.TemporaryDirectory&version=3.0.9
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.Framework.TemporaryDirectory
TemporaryDirectory
Create a unique empty folder that is deleted at the end of the scope.
using var temporaryDirectory = TemporaryDirectory.Create();
temporaryDirectory.CreateEmptyFile("test/demo.txt");
File.WriteAllText(temporaryDirectory.GetFullPath("foo.txt"), "bar");
TemporaryFile
Create a unique file that is deleted at the end of the scope.
// Generated name under the system temp folder
using var temporaryFile = TemporaryFile.Create();
File.WriteAllText(temporaryFile.FullPath, "content");
// Choose the file name; a unique parent folder is created for it
using var namedFile = TemporaryFile.Create("custom.txt");
// Choose the full path. The file must not already exist.
using var atPath = TemporaryFile.Create(FullPath.Combine(Path.GetTempPath(), "custom.txt"));
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Meziantou.Framework.FullPath (>= 3.0.9)
-
net11.0
- Meziantou.Framework.FullPath (>= 3.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Meziantou.Framework.TemporaryDirectory:
| Package | Downloads |
|---|---|
|
ANcpLua.Roslyn.Utilities.Testing
Fluent testing framework for Roslyn analyzers, code fixes, and incremental generators with caching validation, forbidden type detection, and comprehensive assertion support. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.9 | 141 | 9/15/2026 |
| 3.0.8 | 260 | 9/13/2026 |
| 3.0.7 | 348 | 9/11/2026 |
| 3.0.6 | 265 | 9/9/2026 |
| 3.0.5 | 555 | 9/6/2026 |
| 3.0.4 | 580 | 9/3/2026 |
| 3.0.3 | 566 | 8/30/2026 |
| 3.0.2 | 594 | 8/23/2026 |
| 3.0.1 | 4,867 | 7/8/2026 |
| 3.0.0 | 417 | 7/5/2026 |
| 2.0.8 | 1,109 | 6/28/2026 |
| 2.0.7 | 691 | 6/22/2026 |
| 2.0.6 | 372 | 6/14/2026 |
| 2.0.5 | 269 | 6/13/2026 |
| 2.0.4 | 137 | 6/13/2026 |
| 2.0.3 | 354 | 6/7/2026 |
| 2.0.2 | 3,262 | 5/31/2026 |
| 2.0.1 | 1,007 | 5/23/2026 |
| 2.0.0 | 2,374 | 5/6/2026 |
| 1.0.40 | 3,795 | 4/26/2026 |
Loading failed