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.

Impossible to use IReadOnlyList<T>

See original GitHub issue

After adding TaskScheduler Nuget package I can’t use IReadOnlyList<T> from standard .NET library and see the next error in my code:

The type 'IReadOnlyList<T>' exists in both 'Microsoft.Win32.TaskScheduler, Version=2.8.1.0, Culture=neutral, PublicKeyToken=c416bc1b32d97233' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

.Net Framework 4.5, version of TaskScheduler Nuget package 2.8.1.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dahallcommented, Sep 17, 2019

IReadOnlyList is only included in the .NET 2.0, 3.0 and 4.0 builds for backwards compatibility. My guess is that somehow, when Visual Studio unpacked your update, something went wrong and the incorrect build got associated with your project. I would remove the NuGet package from your package and re-reference it to see if the error goes away. I have a .NET 4.7.2 project building against this library without the error and it should be working the same.

0reactions
kaizenn17commented, Oct 15, 2020

vine a decir que ya elimine el troyano, lo borre y elimine por cmd, muchas gracias!! sos un idolo!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't List<T> explicitly implement IReadOnlyList<T>?
I think the tool you're using is causing the confusion. The indexer in the list is not implemented explicitly as IList implementation.
Read more >
Example of why IReadOnlyList<T> is better than public List ...
Early today, I gave an answer to someone where I recommended using IReadOnlyList<T> . Then I was asked why not just use a...
Read more >
IEnumerable vs IReadOnlyList
Today, I'd like to talk about IEnumerable and IReadOnlyList collection interfaces. ... Use IReadOnlyList when possible.
Read more >
IEnumerable<T> Vs IReadOnlyList<T>
IEnumerable<T> and IReadOnlyList<T> both returns an immutable collection (in common use case - more on this shortly), which cannot be altered by ...
Read more >
XPCollection<T> should implement IReadOnlyList<T> and ...
This is simply impossible by design and means that implementing i.e. IReadOnlyList<T> only guarantees that the reading methods & properties of ...
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