ljbc1994 / BlazorIntersectionObserver

🔎 Intersection Observer API wrapper for Blazor applications
MIT License
61 stars 12 forks source link

ElementRef does not exist #8

Closed CybrZr00 closed 3 years ago

CybrZr00 commented 4 years ago

Describe the bug Currently, this library uses Microsoft.AspNetCore.Components.ElementRef, however, it seems like it is Microsoft.AspNetCore.Components.ElementReference, that is needed, as such, there is an error stating that ElementRef does not belong to Microsoft.AspNetCore.Components. I am using Blazor server-side, if that matters?

To Reproduce Steps to reproduce the behavior:

  1. In visual studio (latest stable version), create a Blazor server-side app
  2. Install BlazorintersecttionObserver via NuGet
  3. set up the service setup sample given in the readme.
  4. See error

Expected behavior The library should work without having to change/modify types

Desktop (please complete the following information):

ljbc1994 commented 4 years ago

Hey @CybrZr00,

Thanks for raising, this library is currently at 3.0.0-preview5-19227-01, so you've probably got a new version of the preview, thus causing the error. What version of blazor are you using?

I've got a branch bumping the library to core 3.1, however there's an outstanding issue preventing static assets from being bundled into a project. So I'm holding off until preview 5 for 3.1 comes out.

Apologies, and will let you know asap when the new version is released!

CybrZr00 commented 4 years ago

Ah that would be the problem then! I'm currently using 3.1.101

I look forward to seeing the new version.

benwurth commented 4 years ago

I'd love to use this library in Core 3.1. Is there any update on this issue?

ljbc1994 commented 3 years ago

Hey both, sorry for the delay!

This library has been updated to be compatible with the latest .NET 5. Sorry if that's an issue as you wanted compatibility with 3 but I thought a fresh start with 5 made the most sense.