You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unhandled exception. System.InvalidOperationException: Reflection-based serialization has been disabled for this application. Either use the source generator APIs or explicitly configure the 'JsonSerializerOptions.TypeInfoResolver' property.
at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerIsReflectionDisabled()
at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer()
at System.Text.Json.JsonSerializerOptions.MakeReadOnly(Boolean)
at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions, Type)
at System.Text.Json.JsonSerializer.Serialize(Object , Type, JsonSerializerOptions )
at Telegram.Bot.Requests.RequestBase`1.ToHttpContent()
at Telegram.Bot.TelegramBotClient.MakeRequestAsync[TResponse](IRequest`1, CancellationToken )
at Telegram.Bot.TelegramBotClientExtensions.SendTextMessageAsync(ITelegramBotClient , ChatId , String , Nullable`1 , ParseMode , IEnumerable`1 , LinkPreviewOptions , Boolean , Boolean , String , ReplyParameters , IReplyMarkup , String , CancellationToken )
at monitor.TelegramNotifier.Send(String, String) in /home/cb/monitor/TelegramNotifier.cs:line 25
at monitor.Program.Main(String[]) in /home/cb/monitor/Program.cs:line 81
at monitor.Program.<Main>(String[])
Environment data
NuGet Package Version: 21.6.2
.NET Version: 8
IDE: VS Code on Linux
App: Simple console app, built as single-file, self-contained and trimmed
The text was updated successfully, but these errors were encountered:
Steps to reproduce
TelegramBotClient
SendTextMessageAsync
methodto csproj
Expected behavior
Message sent to provided id
Actual behavior
Crash with following Exception
Environment data
NuGet Package Version: 21.6.2
.NET Version: 8
IDE: VS Code on Linux
App: Simple console app, built as single-file, self-contained and trimmed
The text was updated successfully, but these errors were encountered: