Meziantou.Framework.TemporaryDirectory 3.0.11

Prefix Reserved
dotnet add package Meziantou.Framework.TemporaryDirectory --version 3.0.11
                    
NuGet\Install-Package Meziantou.Framework.TemporaryDirectory -Version 3.0.11
                    
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.11" />
                    
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.11" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Framework.TemporaryDirectory" />
                    
Project file
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.11
                    
#r "nuget: Meziantou.Framework.TemporaryDirectory, 3.0.11"
                    
#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.11
                    
#: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.11
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Framework.TemporaryDirectory&version=3.0.11
                    
Install as a Cake Tool

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 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.

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.11 884 10/11/2026
3.0.10 1,341 9/20/2026
3.0.9 776 9/15/2026
3.0.8 334 9/13/2026
3.0.7 446 9/11/2026
3.0.6 294 9/9/2026
3.0.5 574 9/6/2026
3.0.4 668 9/3/2026
3.0.3 607 8/30/2026
3.0.2 611 8/23/2026
3.0.1 5,141 7/8/2026
3.0.0 425 7/5/2026
2.0.8 1,149 6/28/2026
2.0.7 706 6/22/2026
2.0.6 385 6/14/2026
2.0.5 282 6/13/2026
2.0.4 149 6/13/2026
2.0.3 366 6/7/2026
2.0.2 3,276 5/31/2026
2.0.1 1,016 5/23/2026
Loading failed