TelegramBots / Telegram.Bot.Examples

Examples for the Telegram.Bot C# Library
MIT License
630 stars 289 forks source link

Error opening example project in visual studio #501

Closed domosbg closed 10 months ago

domosbg commented 10 months ago

Hello, i have problems with the example project in visual studio 2022.

VS complains about problems with the Telegram.Bot 19.0.0 package.

Error message: NU1202 Package Telegram.Bot 19.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Telegram.Bot 19.0.0 does not support any target frameworks.

Any ideas how to fix this?

Additional informations: I have tried to update an existing Telegram bot aplication to the latest package Version. It has been a .net framework application, so i must upgrade it to .net 6.0. Also in this case I run into the same error message. I tried different .net version and also version 18.0.0 of telegram bot, but nothing helps. Because of that I have downloaded the example application to try if the example works, but same problem.

Thanks in advanced for your help.

Best regards

Fedorus commented 10 months ago

Do you have ,net6 or higher installed ?

domosbg commented 10 months ago

Hello, thanks a lot for your help. Yes, .net 6 was installed.

I also tried the example project on another workstation at the weekend. Everything work here without any problems.

But finally it works also on the other workstation after:

Besides now my own project also seems to work after I have reupgraded it again from the old project.

Maybe there was something confused on my system because of the installation of visual studio and the different .net SDK.

Best regards