BytexDigital.Blazor.Components.CookieConsent icon indicating copy to clipboard operation
BytexDigital.Blazor.Components.CookieConsent copied to clipboard

Issues with Blazor Web App setup

Open AlbertoPa opened this issue 1 year ago • 5 comments

When configuring the .Net 8 blazor web app, following the instructions, I face two issues:

<BytexDigital.Blazor.Components.CookieConsent.CookieConsentInitializer @rendermode="@RenderMode.Server" />

is not found. and, when adding

builder.Services.AddCookieConsent(o =>
{
    // The same configuration as on the server! Best to put this lambda in a shared project to reuse to reduce duplication.
}, withUserInterface: false);

no AddCookieConsent which takes two inputs is found.

AlbertoPa avatar Jan 31 '24 04:01 AlbertoPa

Hey, are you using the latest preview version of the library?

RyanTT avatar Jan 31 '24 12:01 RyanTT

I was using 1.0.18 (stable).

AlbertoPa avatar Jan 31 '24 14:01 AlbertoPa

Please try the latest preview, it should work there. I haven't pushed this build to a stable release yet but will do that soon.

RyanTT avatar Jan 31 '24 14:01 RyanTT

Testing right now :-)

P.S. Do you have guidelines for auto rendermode? Should we use the InteractiveServer/InteractiveWebAssembly settings as in the example, or just use InteractiveAuto?

AlbertoPa avatar Jan 31 '24 14:01 AlbertoPa

The preview version works. The only issue I found is that it seems to have one problem when trimming:

image

Other than that, it works fine. Thank you for your help.

AlbertoPa avatar Jan 31 '24 22:01 AlbertoPa