Eigenverft.WebLib.Hosting.DirectoryLayout 1.0.0.6

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

Eigenverft.WebLib.Hosting.DirectoryLayout

NuGet Version NuGet Downloads Repository CI Targets License

Executable-rooted ASP.NET Core hosting that shares NetLib’s validated application directory layout and connects it to content roots, web roots, and wwwroot.

✨ At a glance

Capability What it does
WebApplicationBuilderFactory.CreateWithDefaultDirectory Creates a WebApplicationBuilder rooted at the executable directory.
IAppDirectoryLayout Access the shared semantic directories, including the Web mapping.
Dependency Eigenverft.NetLib.Hosting.DirectoryLayout is included transitively.

📦 Installation

dotnet add package Eigenverft.WebLib.Hosting.DirectoryLayout

🚀 Quick start

Executable-rooted web host

using Eigenverft.NetLib.Hosting.DirectoryLayout;
using Eigenverft.WebLib.Hosting.DirectoryLayout;
using Microsoft.AspNetCore.Builder;

WebApplicationBuilder builder =
    WebApplicationBuilderFactory.CreateWithDefaultDirectory(args);

IAppDirectoryLayout directories = builder.GetDirectoryLayout();
string settingsPath = directories[DefaultDirectory.ApplicationSettings];
string webRoot = builder.Environment.WebRootPath;

WebApplication app = builder.Build();
app.MapGet("/", () => $"Settings: {settingsPath}; web root: {webRoot}");
app.Run();

Package behavior

<code>CreateWithDefaultDirectory(args)</code> roots ContentRootPath at AppContext.BaseDirectory, sets WebRootPath to wwwroot below that root, and delegates directory creation, layout registration, validation, and writable checks to NetLib. The created layout is available from the builder before Build and from application services afterwards.

The default semantic directories keep their NetLib names, such as AppSettings, AppCerts, AppData, AppState, and AppLogs. The Web key maps to wwwroot. Pass typed DefaultDirectory overrides to change selected application folders, or a string-keyed folder map for a custom layout. Unspecified typed entries keep their defaults.

The factory enforces the standard wwwroot name by default so ASP.NET Core’s web-root path and the semantic Web mapping cannot disagree. Use strictWwwrootName: false only when a custom web-root folder name is intentional. Folder names remain subject to NetLib’s layout validation.

🎯 Target frameworks

Targets .NET 8 and .NET 10. A .NET 9 application can consume the compatible net8.0 asset.

📄 License

Licensed under the MIT License by Eigenverft.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.6 70 9/29/2026
1.0.0.5 85 9/28/2026
1.0.0.4 100 9/12/2026

Initial capability package extracted from Eigenverft.WebLib.Infrastructure.

- Executable-rooted application directory layout and WebApplicationBuilder environment helpers for ASP.NET Core hosting.
- Public namespaces and behavior remain compatible with the original Infrastructure implementation.