DcsvIo.D2.ProblemDetails.Abstractions 0.1.2

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

DcsvIo.D2.ProblemDetails.Abstractions

Single home for the RFC 7807 ProblemDetails wire-format catalog consumed by every .NET emit path. Declares one static class — DcsvIo.D2.ProblemDetails.D2ProblemDetailsKeys — carrying the TYPE_URI_PREFIX, CONTENT_TYPE, EXTENSION_* extension-key constants, TITLE_* per-status title constants, and the TitleFor(HttpStatusCode) switch helper. The class is codegen-emitted from the problem-details contract spec by DcsvIo.D2.ProblemDetails.SourceGen.

Zero runtime dependencies. Consumers pull the constants via a package reference and get the full catalog at compile time. No transitive infrastructure surface.

Install

dotnet add package DcsvIo.D2.ProblemDetails.Abstractions

Consumers

Consumer Use
Host-supplied JWT / auth middleware — path A ToProblemDetails Builds RFC 7807 body from auth D2Result failures; populates Type/Title/Status/Instance + 6 extension keys from spec constants.
DcsvIo.D2.AspNetCore — path B D2ProblemDetailsCustomizer.Apply Reads originating D2Result from HttpContext.Items[D2ProblemDetailsContextItems.D2_RESULT]; sets identical body fields from same spec constants. Plus unconditional traceId + correlationId extensions for diagnostic correlation even when no D2Result is stashed.
Host auth middleware write path Sets Response.ContentType = D2ProblemDetailsKeys.CONTENT_TYPE (the spec-driven application/problem+json per RFC 7807 §6.1).

Cross-language parity

The same spec drives the TypeScript package @dcsv-io/d2-problem-details-abstractions. Wire values for the URI prefix, MIME type, extension keys, and per-status titles are byte-equal across .NET and TS by construction — cross-language drift is structurally impossible.

Dependencies

  • DcsvIo.D2.ProblemDetails.SourceGen (build-time analyzer)

No runtime dependencies — pure constants.

Reference

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DcsvIo.D2.ProblemDetails.Abstractions:

Package Downloads
DcsvIo.D2.AspNetCore

Cross-cutting ASP.NET Core middleware and endpoint primitives for D2 service composition roots (security headers, CORS, health endpoints, ProblemDetails, mTLS, infrastructure-path matching).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.2 131 7/17/2026
0.1.1 123 7/17/2026