ProfanityFilter.Hosting 13.4.0

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

Profanity Filter: Hosting

This .NET library adds the Potty Mouth profanity-filter API to an Aspire AppHost as a first-class ContainerResource. The default container image is ghcr.io/ievangelist/profanity-filter-api:13.4.0.

The integration is built for Aspire 13.4 and uses analyzer-validated [AspireExport] metadata, so the same package works from C# AppHosts and generated TypeScript AppHost SDKs.

Get started

To install the ProfanityFilter.Hosting NuGet package:

aspire add ProfanityFilter.Hosting

C# AppHost

var builder = DistributedApplication.CreateBuilder(args);

var filter = builder.AddProfanityFilter("profanity-filter")
    .WithCustomDataBindMount("./CustomData");

builder.AddProject<Projects.MyApi>("api")
    .WithReference(filter)
    .WaitFor(filter);

builder.Build().Run();

TypeScript AppHost

Use apphost.mts with the Aspire 13.4 generated SDK under .aspire/modules:

import { createBuilder } from "./.aspire/modules/aspire.mjs";

const builder = await createBuilder();

const filter = await builder
    .addProfanityFilter("profanity-filter")
    .withCustomDataBindMount("./CustomData");

await builder.addProject("api", { project: "../src/MyApi/MyApi.csproj" })
    .withReference(filter)
    .waitFor(filter);

const app = await builder.build();
await app.run();

Do not edit files under .aspire/modules; Aspire regenerates them when packages are added or restored.

Exported API

C# API TypeScript API Description
AddProfanityFilter(name) builder.addProfanityFilter(name) Adds the profanity-filter API container to the application model.
WithCustomDataBindMount(source) .withCustomDataBindMount(source) Bind-mounts newline-delimited *.txt word lists into /app/CustomData.
ProfanityFilterResource.HttpsEndpoint httpsEndpoint() Exposes the HTTPS endpoint used by the generated connection string.

This library pairs with ProfanityFilter.Client, which registers typed REST and SignalR clients that consume the resource connection string.

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.

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
13.4.0 56 6/2/2026
13.3.0 99 5/8/2026
9.0.7-alpha.0.10 283 12/15/2025
9.0.7-alpha.0.9 239 12/15/2025
9.0.7-alpha.0.8 251 12/15/2025
9.0.7-alpha.0.7 402 12/11/2025
9.0.7-alpha.0.2 243 3/6/2025
0.0.0-alpha.0.273 238 12/15/2025