question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The type initializer for 'Tweetinvi.Auth' threw an exception. System.Collections

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
WhiteLionATXcommented, Jul 14, 2019

4.8 fixed nothing for me.

2reactions
paranoikscommented, Jun 24, 2019

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found