Soenneker.Utils.Paths.Resources 11.0.350

Prefix Reserved
dotnet add package Soenneker.Utils.Paths.Resources --version 11.0.350
                    
NuGet\Install-Package Soenneker.Utils.Paths.Resources -Version 11.0.350
                    
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="Soenneker.Utils.Paths.Resources" Version="11.0.350" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Utils.Paths.Resources" Version="11.0.350" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Utils.Paths.Resources" />
                    
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 Soenneker.Utils.Paths.Resources --version 11.0.350
                    
#r "nuget: Soenneker.Utils.Paths.Resources, 11.0.350"
                    
#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 Soenneker.Utils.Paths.Resources@11.0.350
                    
#: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=Soenneker.Utils.Paths.Resources&version=11.0.350
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Utils.Paths.Resources&version=11.0.350
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.Paths.Resources

Resolves an application's Resources directory across local, Azure, and GitHub Actions environments and safely constructs paths beneath it.

Installation

dotnet add package Soenneker.Utils.Paths.Resources

Quick start

using Soenneker.Utils.Paths.Resources.Registrars;

services.AddResourcesPathUtilAsSingleton();

Then inject IResourcesPathUtil wherever you need it.

Resolve the Resources directory

string resourcesDirectory = await resourcesPathUtil.Get(cancellationToken);
string templatePath = await resourcesPathUtil.GetResourceFilePath(
    Path.Combine("Templates", "invoice.html"),
    cancellationToken);

GetResourceFilePath accepts a relative file or nested path and guarantees the normalized result stays beneath the resolved Resources directory. Rooted paths and .. traversal outside that directory throw InvalidOperationException. The method only constructs a path; it does not require the file to exist.

The directory is resolved in this order:

  1. Existing directory from RESOURCES_DIR.
  2. Resources beside the running application's base directory.
  3. Azure HOME/site/wwwroot/Resources for Functions or App Service.
  4. A Resources directory found from the current directory within a GitHub Actions workspace, then <GITHUB_WORKSPACE>/Resources.
  5. A Resources directory found by walking upward from the current directory.
  6. HOME/site/wwwroot/Resources outside Azure.
  7. The application-base Resources path as a last resort, even when it does not exist.

Resolution never creates the directory. The first result is cached by each utility instance, so changes to environment variables, the current directory, or the filesystem are not observed by later calls on that instance. Singleton registration shares that cached decision application-wide; scoped registration resolves once per scope.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (13)

Showing the top 5 NuGet packages that depend on Soenneker.Utils.Paths.Resources:

Package Downloads
Soenneker.Git.Util

Asynchronous Git operations, repository discovery, and bounded batch processing using bundled Git distributions.

Soenneker.Validators.Email.Disposable

Checks whether an email address uses a disposable or temporary domain.

Soenneker.Validators.ZipCode.Exists

Validates US ZIP codes against a packaged data snapshot

Soenneker.Compression.SevenZip

A utility library for 7zip compression related operations

Soenneker.Cloudflare.Validators.Request

Validates ASP.NET Core client certificates against Cloudflare's Authenticated Origin Pull CA.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.350 0 12/3/2026
11.0.349 270 12/3/2026
11.0.348 169 12/3/2026
11.0.347 142 12/3/2026
11.0.346 415 12/2/2026
11.0.345 351 12/2/2026
11.0.343 234 12/2/2026
11.0.342 47 12/2/2026
11.0.341 1,233 12/2/2026
11.0.340 326 12/2/2026
11.0.339 868 12/2/2026
11.0.338 1,116 12/1/2026
11.0.337 224 12/1/2026
11.0.336 448 12/1/2026
11.0.335 244 12/1/2026
11.0.334 274 12/1/2026
11.0.333 1,296 12/1/2026
11.0.332 151 12/1/2026
11.0.331 2,484 11/30/2026
11.0.330 514 11/30/2026
Loading failed

Updated Multiple NuGet packages