David-Desmaisons / DiscogsClient

Discogs API C# Client
MIT License
42 stars 16 forks source link

Missing ForEachAsync #9

Closed Coffmans closed 5 years ago

Coffmans commented 5 years ago

I must be missing something as I am unable to build with DiscogsClient. I am receiving a compilation error related to ForEachAsync.

        var observable = _DiscogsClient.Search(discogsSearch);
        return observable.ForEachAsync(OnResult);

Exact error is below: 'IObservable' does not contain a definition for 'ForEachAsync' and no accessible extension method 'ForEachAsync' accepting a first argument of type 'IObservable' could be found (are you missing a using directive or an assembly reference?)

Latest version (2.3.0) is installed. Any idea what I might be missing? Any suggestions?

David-Desmaisons commented 5 years ago

@Coffmans Did you restore the nugget packages? If not please do it and rebuild. If so did you update them?

Coffmans commented 5 years ago

I un-installed, removed the files, and re-installed the DiscogsClient nuget packages. AFAIK, the latest package is installed for the project.

DiscogsClient 2.3.0 RestSharp 106.5.4 RestSharpHelper 1.1.1 System.Reactive 4.1.2

After install of the nuget package, I am prompted with an update for System.Reactive. No difference after the update. Running VS2017.

Still no luck eliminating the compilation error.

Apologies for the re-post. I was logged in under my work account.

David-Desmaisons commented 5 years ago

DiscogsClient use System.Reactive 4.0.0 so you should use the same version in your project. For the code using the ForEachAsync make sure that you have a refernce toSystem.Reactive and add using System.Reactive.Linq