MissingMethodException on trying to get Funogram.Telegram.Bot.Config.defaultConfig
ForNeVeR opened this issue · 3 comments
ForNeVeR commented
Create a fresh .NET 6 F# project, install Funogram.Telegram
package v6.1.0.1, then write the following code:
let config = Funogram.Telegram.Bot.Config.defaultConfig
printfn "%A" config
When ran, this will fail with an exception:
Unhandled exception. System.TypeInitializationException: The type initializer for '<StartupCode$Funogram-Telegram>.$Funogram.Telegram.Bot' threw an exception.
---> System.MissingMethodException: Method not found: 'Void BotConfig..ctor(System.String, Microsoft.FSharp.Core.FSharpOption`1<Int64>, Microsoft.FSharp.Core.FSharpOption`1<Int64>, Microsoft.FSharp.Core.FShar
pOption`1<Int64>, Microsoft.FSharp.Core.FSharpOption`1<System.Collections.Generic.IEnumerable`1<System.String>>, Microsoft.FSharp.Core.FSharpFunc`2<System.Exception,Microsoft.FSharp.Core.Unit>, System.Uri, Sys
tem.Net.Http.HttpClient, Microsoft.FSharp.Core.FSharpOption`1<BotWebHook>)'.
at <StartupCode$Funogram-Telegram>.$Funogram.Telegram.Bot..cctor()
--- End of inner exception stack trace ---
at Funogram.Telegram.Bot.Config.get_defaultConfig()
at <StartupCode$ConsoleApp8>.$Program.main@() in C:\Temp\ConsoleApp8\ConsoleApp8\Program.fs:line 1
ForNeVeR commented
It's possible that you forgot to publish a fresh version of Funogram package (only v2.0.3 is available).
Dolfik1 commented
FIxed in v2.0.4
ForNeVeR commented
Thanks! I confirm that the issue is fixed.