Describe the bug
I'm following the guide at https://docs.microsoft.com/en-us/aspnet/core/blazor/components/prerendering-and-integration?view=aspnetcore-6.0&pivots=server#preserve-prerendered-state to preserve the prerendered component state. However when I try to run the application I get the following error:

To Reproduce
1 -> Create new Blazor Server template
2 -> Add the <preserve-component-state /> below <script src="_framework/blazor.server.js"></script> in _Host.cshtml
3 -> Change the code in FetchDate.razor to the code mentioned in https://docs.microsoft.com/en-us/aspnet/core/blazor/components/prerendering-and-integration?view=aspnetcore-6.0&pivots=server#preserve-prerendered-state.
4 -> Run application
It seems this issue also occurs using the hosted webassembly template but I'm not familiar enough with that approach to be 100% sure of that.
A few more potential issuesI have noticed:
Further technical details
ASP.NET Core version 6.0.100-preview.7.21379.14
Visual studio community 2022 preview 3.1
Describe the bug
I'm following the guide at https://docs.microsoft.com/en-us/aspnet/core/blazor/components/prerendering-and-integration?view=aspnetcore-6.0&pivots=server#preserve-prerendered-state to preserve the prerendered component state. However when I try to run the application I get the following error:

To Reproduce
1 -> Create new Blazor Server template
2 -> Add the
<preserve-component-state />below<script src="_framework/blazor.server.js"></script>in_Host.cshtml3 -> Change the code in
FetchDate.razorto the code mentioned in https://docs.microsoft.com/en-us/aspnet/core/blazor/components/prerendering-and-integration?view=aspnetcore-6.0&pivots=server#preserve-prerendered-state.4 -> Run application
It seems this issue also occurs using the hosted webassembly template but I'm not familiar enough with that approach to be 100% sure of that.
A few more potential issuesI have noticed:
ApplicationState.OnPersistingis not working because when I add a breakpoint it doesn't seem to be getting hit<preserve-component-state />Further technical details
ASP.NET Core version 6.0.100-preview.7.21379.14
Visual studio community 2022 preview 3.1