Issues with Tweetinvi 0.9.5.2 - Binaries

Feb 26, 2015 at 10:22 PM
I am new to Tweetinvi, I just downloaded the latest version. and I am trying to use it based on the documentation i read the website.

i just tried to implement this line of code:
TwitterCredentials.SetCredentials(TweetKey.AccessToken, TweetKey.AccessTokenSecret, TweetKey.ConsumerKey, TweetKey.ConsumerSecret);

and I keep getting this error:
System.TypeInitializationException: The type initializer for 'Tweetinvi.TwitterC
redentials' threw an exception. ---> System.TypeInitializationException: The typ
e initializer for 'Tweetinvi.TweetinviContainer' threw an exception. ---> System
.IO.FileLoadException: Could not load file or assembly 'System.Core, Version=2.0
.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one
of its dependencies. The given assembly name or codebase was invalid. (Exceptio
n from HRESULT: 0x80131047)
at Autofac.Builder.RegistrationData..ctor(Service defaultService)
at Autofac.Builder.RegistrationBuilder`3..ctor(Service defaultService, TActiv
atorData activatorData, TRegistrationStyle style)
at Autofac.Builder.RegistrationBuilder.ForTypeTImplementer
at Autofac.RegistrationExtensions.RegisterType[TImplementer](ContainerBuilder
builder)
at Tweetinvi.Injectinvi.AutofacContainer.RegisterType[T,U](RegistrationLifeti
me registrationLifetime)
at Tweetinvi.TweetinviModule.Initialize()
at Tweetinvi.Injectinvi.AutofacContainer.InitializeModules()
at Tweetinvi.Injectinvi.AutofacContainer.Initialize()
at Tweetinvi.Injectinvi.AutofacContainer..ctor()
at Tweetinvi.TweetinviContainer..cctor()
--- End of inner exception stack trace ---
at Tweetinvi.TweetinviContainer.ResolveT
at Tweetinvi.TwitterCredentials..cctor()
--- End of inner exception stack trace ---
at Tweetinvi.TwitterCredentials.SetCredentials(String userAccessToken, String
userAccessSecret, String consumerKey, String consumerSecret)
at DigitalMedia.Main.Program.Main(String[] args)
Coordinator
Feb 26, 2015 at 10:25 PM
Hi,

I need the following information to help you:
  • What are you targeting (Windows 7, 8, 10 - Windows Phone 8/8.1, Windows RT)
  • How did you get the library (download on the website vs. nuget)
Sorry for this problem.
Linvi
Feb 26, 2015 at 11:03 PM
Edited Feb 26, 2015 at 11:05 PM
Hi Linvi,

I am using Windows 7
I downloaded the library from the website and added them to my project.

Thank you.
Coordinator
Feb 26, 2015 at 11:07 PM
Thanks for the response, can you tell me which .NET Framework the applicatin targets?

Linvi
Feb 26, 2015 at 11:12 PM
I am using .NET Framework 4.0
Coordinator
Feb 26, 2015 at 11:13 PM
Could you try and target .NET Framework 4.5 and let me know what happens please.
Coordinator
Feb 26, 2015 at 11:30 PM
Hi,

It is getting quite late here. Please keep me up to date with your issue but I will have to reply tomorrow.

Cheers,
Linvi
Feb 26, 2015 at 11:43 PM
I am using VS2010, so I think I cannot use .NET framewok 4.5 on it.
Coordinator
Feb 27, 2015 at 8:34 AM
Please try using Nuget (Install-Package TweetinviAPI).

I have just tested (Windows 7 + Visual Studio 2010 + .NET Framework 4) and it works, I will try later from the binaries directly.

Linvi
Marked as answer by linvi on 2/27/2015 at 10:14 AM
Feb 27, 2015 at 9:21 AM
Thanks a lot Linvi, It works now.

Please is there a documentation of the API that shows the Methods in it and what it returns?

Thank you.
Coordinator
Feb 27, 2015 at 9:59 AM
Well you have the documentation here : https://tweetinvi.codeplex.com/documentation.
I have not created any documentation that shows what each method is returning. Instead each method name should be clear enough for you to know what it will return.

If you find any method for which you are not sure what it returns, please let me know.

Linvi