Meziantou.Framework.TemporaryDirectory
3.0.15
Prefix Reserved
dotnet add package Meziantou.Framework.TemporaryDirectory --version 3.0.15
NuGet\Install-Package Meziantou.Framework.TemporaryDirectory -Version 3.0.15
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.15" />
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.15" />
<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.15
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.TemporaryDirectory, 3.0.15"
#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.15
#: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.15
#tool nuget:?package=Meziantou.Framework.TemporaryDirectory&version=3.0.15
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-{Guid.NewGuid():N}.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.15)
-
net11.0
- Meziantou.Framework.FullPath (>= 3.0.15)
NuGet packages (3)
Showing the top 3 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. |
|
|
ANcpLua.Roslyn.Utilities.Testing.MSBuild
Framework-independent project, process, and MSBuild test helpers. |
|
|
ANcpLua.Roslyn.Utilities.Testing.Xunit
Opt-in Xunit integrations for ANcpLua Roslyn testing utilities. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.15 | 270 | 11/5/2026 |
| 3.0.14 | 715 | 10/28/2026 |
| 3.0.13 | 489 | 10/24/2026 |
| 3.0.12 | 483 | 10/21/2026 |
| 3.0.11 | 1,277 | 10/11/2026 |
| 3.0.10 | 1,404 | 9/20/2026 |
| 3.0.9 | 920 | 9/15/2026 |
| 3.0.8 | 348 | 9/13/2026 |
| 3.0.7 | 523 | 9/11/2026 |
| 3.0.6 | 313 | 9/9/2026 |
| 3.0.5 | 591 | 9/6/2026 |
| 3.0.4 | 686 | 9/3/2026 |
| 3.0.3 | 617 | 8/30/2026 |
| 3.0.2 | 621 | 8/23/2026 |
| 3.0.1 | 5,189 | 7/8/2026 |
| 3.0.0 | 439 | 7/5/2026 |
| 2.0.8 | 1,156 | 6/28/2026 |
| 2.0.7 | 713 | 6/22/2026 |
| 2.0.6 | 395 | 6/14/2026 |
| 2.0.5 | 293 | 6/13/2026 |
Loading failed