Skip to main content

Documentation Index

Fetch the complete documentation index at: https://ancplua.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Source: Al0096EnableEventSourceSupportAnalyzer.cs

Description

Native AOT trims EventSource by default. If your application uses OpenTelemetry or other EventSource-based diagnostics, you must enable EventSourceSupport in the project file.

Bad Code

<PublishAot>true</PublishAot>
<!-- EventSourceSupport not set, EventSource is trimmed -->

Good Code

<PublishAot>true</PublishAot>
<EventSourceSupport>true</EventSourceSupport>

Properties

  • Category: Configuration
  • Severity: Warning
  • Enabled by default: True
  • Code fix available: False

Configuration

dotnet_diagnostic.AL0096.severity = warning