Description
LoggerMessageGenerator not support [Obsolete] with argment(s).
Reproduction Steps
public static partial class LoggerExtensions
{
[LoggerMessage((int)LogLevel.Trace, LogLevel.Trace, "{Msg}")]
[Obsolete("test")]
public static partial void Trace(this ILogger logger, string msg, Exception? ex = null);
}
Expected behavior
Not error.
Actual behavior
warning CS8785: Generator 'LoggerMessageGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'InvalidCastException' with message 'Specified cast is not valid.'
Regression?
No response
Known Workarounds
Delete [Obsolete] argment.
Configuration
No response
Other information
No response