diff --git a/src/Stl.Fusion.Blazor/Components/ComponentExt.cs b/src/Stl.Fusion.Blazor/Components/ComponentExt.cs index 30ea308a..29682650 100644 --- a/src/Stl.Fusion.Blazor/Components/ComponentExt.cs +++ b/src/Stl.Fusion.Blazor/Components/ComponentExt.cs @@ -87,7 +87,7 @@ public static bool ShouldSetParameters(this ComponentBase component, ParameterVi return componentInfo.ShouldSetParameters(component, parameterView) || !component.IsInitialized(); } -#if !NET8_0_OR_GREATER +#if USE_UNSAFE_ACCESSORS && NET8_0_OR_GREATER static ComponentExt() { var bfInstanceNonPublic = BindingFlags.Instance | BindingFlags.NonPublic;