Skip to content
Docs Try Aspire

MarkdownString

Class sealed net8.0
📦 Aspire.Hosting v13.2.0
Represents a string that contains Markdown-formatted content.
namespace Aspire.Hosting.Pipelines;
public sealed class MarkdownString
{
// ...
}
Use this type to explicitly indicate that a string value should be interpreted as Markdown when displayed in pipeline output. APIs that accept both String and MarkdownString will render Markdown formatting (such as bold, links, and lists) only when a MarkdownString is provided; plain String values are displayed as-is without Markdown processing.
// Log a message with Markdown formatting
step.Log(LogLevel.Information, new MarkdownString("Deployed **myapp** to [endpoint](https://example.com)"));
// Add a Markdown-formatted value to the pipeline summary
summary.Add("Key", new MarkdownString($"[{name}]({url})"));