Meziantou.Framework.TemporaryDirectory
3.0.5
Prefix Reserved
dotnet add package Meziantou.Framework.TemporaryDirectory --version 3.0.5
NuGet\Install-Package Meziantou.Framework.TemporaryDirectory -Version 3.0.5
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.5" />
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.5" />
<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.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.TemporaryDirectory, 3.0.5"
#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.5
#: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.5
#tool nuget:?package=Meziantou.Framework.TemporaryDirectory&version=3.0.5
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.5)
-
net11.0
- Meziantou.Framework.FullPath (>= 3.0.5)
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.5 | 0 | 9/6/2026 |
| 3.0.4 | 206 | 9/3/2026 |
| 3.0.3 | 481 | 8/30/2026 |
| 3.0.2 | 578 | 8/23/2026 |
| 3.0.1 | 4,666 | 7/8/2026 |
| 3.0.0 | 410 | 7/5/2026 |
| 2.0.8 | 1,097 | 6/28/2026 |
| 2.0.7 | 686 | 6/22/2026 |
| 2.0.6 | 370 | 6/14/2026 |
| 2.0.5 | 265 | 6/13/2026 |
| 2.0.4 | 132 | 6/13/2026 |
| 2.0.3 | 352 | 6/7/2026 |
| 2.0.2 | 3,259 | 5/31/2026 |
| 2.0.1 | 1,004 | 5/23/2026 |
| 2.0.0 | 2,228 | 5/6/2026 |
| 1.0.40 | 3,783 | 4/26/2026 |
| 1.0.39 | 194 | 4/25/2026 |
| 1.0.38 | 5,958 | 4/16/2026 |
| 1.0.37 | 4,653 | 3/29/2026 |
| 1.0.36 | 2,681 | 3/15/2026 |
Loading failed