linvi / tweetinvi

Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)...
MIT License
1.01k stars 220 forks source link

Problem when trying to authenticate #603

Open thonydy opened 6 years ago

thonydy commented 6 years ago

Hi i'm working on Rider and when running my project I got this :

Exception non gérée : System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour 'Tweetinvi.Auth'. ---> System.IO.FileLoadException: Impossible de charger le fichier ou l'assembly 'System.Net.Http, Version=4.1.1.0, Culture=neutral, P
ublicKeyToken=b03f5f7f11d50a3a' ou une de ses dépendances. La définition trouvée du manifeste de l'assembly ne correspond pas à la référence de l'assembly. (Exception de HRESULT : 0x80131040)
   à Tweetinvi.Credentials.TweetinviCredentialsModule.Initialize()
   à Tweetinvi.Injectinvi.AutofacContainer.InitializeModules()
   à Tweetinvi.Injectinvi.AutofacContainer.Initialize()
   à Tweetinvi.TweetinviContainer.Resolve[T]()
   à Tweetinvi.Auth.Initialize()
   à Tweetinvi.Auth..cctor()
   --- Fin de la trace de la pile d'exception interne ---
   à Tweetinvi.Auth.CreateCredentials(String consumerKey, String consumerSecret, String userAccessToken, String userAccessSecret)
   à API.Program.Main(String[] args) dans D:\Home_To_Work\UseAPI\API\Program.cs:ligne 11

Could you guys help me please ?

linvi commented 6 years ago

If you are using the latest version of Tweetinvi please read the following : https://github.com/linvi/tweetinvi/wiki/System.Net.Http-not-found-exception

thonydy commented 6 years ago

I dont have any web.config on Rider (jetbrains) That is why I am asking

linvi commented 6 years ago

Web.config is not based on the IDE it is part of the application. If you don't have a web.config or app.config you will have to create one.

This will be copied over during the compilation and the program will use it to access the proper dlls.