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
<PackageReference Include="Eigenverft.WebLib.Hosting.DirectoryLayout" Version="1.0.0.6" />
<PackageVersion Include="Eigenverft.WebLib.Hosting.DirectoryLayout" Version="1.0.0.6" />
<PackageReference Include="Eigenverft.WebLib.Hosting.DirectoryLayout" />
paket add Eigenverft.WebLib.Hosting.DirectoryLayout --version 1.0.0.6
#r "nuget: Eigenverft.WebLib.Hosting.DirectoryLayout, 1.0.0.6"
#:package Eigenverft.WebLib.Hosting.DirectoryLayout@1.0.0.6
#addin nuget:?package=Eigenverft.WebLib.Hosting.DirectoryLayout&version=1.0.0.6
#tool nuget:?package=Eigenverft.WebLib.Hosting.DirectoryLayout&version=1.0.0.6
Eigenverft.WebLib.Hosting.DirectoryLayout
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.
🔗 Project links
📄 License
Licensed under the MIT License by Eigenverft.
| Product | Versions 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. |
-
net10.0
- Eigenverft.NetLib.Hosting.DirectoryLayout (>= 1.0.0.3)
-
net8.0
- Eigenverft.NetLib.Hosting.DirectoryLayout (>= 1.0.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
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.