Meziantou.Framework.TemporaryDirectory
3.0.8
Prefix Reserved
dotnet add package Meziantou.Framework.TemporaryDirectory --version 3.0.8
NuGet\Install-Package Meziantou.Framework.TemporaryDirectory -Version 3.0.8
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.8" />
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.8" />
<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.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.TemporaryDirectory, 3.0.8"
#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.8
#: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.8
#tool nuget:?package=Meziantou.Framework.TemporaryDirectory&version=3.0.8
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.8)
-
net11.0
- Meziantou.Framework.FullPath (>= 3.0.8)
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.8 | 102 | 2026/9/13 |
| 3.0.7 | 264 | 2026/9/11 |
| 3.0.6 | 219 | 2026/9/9 |
| 3.0.5 | 553 | 2026/9/6 |
| 3.0.4 | 579 | 2026/9/3 |
| 3.0.3 | 562 | 2026/8/30 |
| 3.0.2 | 593 | 2026/8/23 |
| 3.0.1 | 4,846 | 2026/7/8 |
| 3.0.0 | 416 | 2026/7/5 |
| 2.0.8 | 1,109 | 2026/6/28 |
| 2.0.7 | 691 | 2026/6/22 |
| 2.0.6 | 372 | 2026/6/14 |
| 2.0.5 | 269 | 2026/6/13 |
| 2.0.4 | 137 | 2026/6/13 |
| 2.0.3 | 354 | 2026/6/7 |
| 2.0.2 | 3,261 | 2026/5/31 |
| 2.0.1 | 1,007 | 2026/5/23 |
| 2.0.0 | 2,348 | 2026/5/6 |
| 1.0.40 | 3,793 | 2026/4/26 |
| 1.0.39 | 196 | 2026/4/25 |
Loading failed