The type initializer for 'Tweetinvi.Auth' threw an exception. System.Collections
See original GitHub issueI’ve seen similar issues in this repository, but couldn’t fix it. If I revert back the Tweetinvi 4.0 it works.
There are 2 inner exceptions.
First (this version does not exist on Nuget): FileNotFoundException: Could not load file or assembly ‘System.Collections, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
Second: FileNotFoundException: Could not load file or assembly ‘System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.
I’ve also tried something this for app.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding>
<dependentAssembly>
<assemblyIdentity name="System.Collections" publicKeyToken="B03F5F7F11D50A3A" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Issue Analytics
- State:
- Created 4 years ago
- Comments:23 (9 by maintainers)
Top Results From Across the Web
The type initializer for 'Tweetinvi.Auth' threw an exception. ...
The type initializer for 'Tweetinvi.Auth ' threw an exception. System.Collections. ... If I revert back the Tweetinvi 4.0 it works.
Read more >The type initializer for 'Tweetinvi.TwitterCredentials' threw ...
i want to retrieve tweets from twitter using specific hashtags. i am using tweetinvi for this purpose.but i am getting an error outer...
Read more >[Solved] The type initializer for '' threw an exception
An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module. Additional information: The type initializer for ...
Read more >Exceptions — Tweetinvi 5.0.4 documentation
TwitterException - It means that Twitter sent a failure response. Tweetinvi will share all the data sent by Twitter. · TwitterAuthException - This...
Read more >Tweetinvi 5.0 is released - C# - .NET - Libraries, SDKs, Samples
Hello, Tweetinvi 5.0 was released 2 weeks ago and I wanted to bring ... but this throws: CS0029 Cannot implicitly convert type 'Tweetinvi....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
4.8 fixed nothing for me.
I managed to solve it. In the end, I had to get the latest version of the code and make sure all the projects in the solution have “.Net Standard 2.0” set as their Target Framework. After that rebuild and manually reference the new DLLs in your project