Skip to content

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.

Troubleshooting — EricksonLopez.Messaging

Common compiler, analyzer, and DI issues in EricksonLopez.Messaging (2.0.0).

EricksonLopez.Messaging.Analyzers fails compilation (TreatWarningsAsErrors=true) if a type implements IMessage without [MessageType("...")] from EricksonLopez.Messaging.Attributes.

  • AddMessagingInstrumentation(): Import using OpenTelemetry.Trace; and using OpenTelemetry.Metrics; (not EricksonLopez.Messaging.OpenTelemetry).
  • ILogger<THandler> in standalone DI: AddMessaging() falls back to NullLogger<T>.Instance for built-in middleware, but custom handlers injecting ILogger<THandler> require services.AddLogging() to pass ValidateOnBuild=true.
  • In v2.0.0, NativeAotJsonSerializer removed DefaultJsonTypeInfoResolver fallback; supply an explicit JsonSerializerContext (IJsonTypeInfoResolver) in AOT hosts.
  • Note on EricksonLopez.Messaging.Generators: Because Roslyn source generators cannot chain into System.Text.Json.SourceGeneration within the same compilation pass, GeneratedMessagingJsonSerializerContext may fail CS0534 when compiling from source via ProjectReference; use explicit [JsonSerializable] contexts when compiling handlers alongside IMessage definitions.