As you may know the official release of .NET 8 is around the corner! It is expected to ship tomorrow (November 14th 2024). We plan to release a new update of Radzen Blazor Studio with official support for .NET 8 shortly after - we just need to update the references and conduct internal tests.
Here is what's new:
New .NET 8 specific application type - Blazor Web Application. It allows to pick interactivity mode - server, web assembly or auto (both).
Radzen Blazor Studio would require .NET 8 SDK to be installed on your machine. This is important: Radzen Blazor Studio won't start if you get the new version via auto update and don't have .NET 8 installed. The solution is simple - just download and install the .NET 8 SDK for your OS. It is backwards compatible with .NET 7 so your existing applications will continue to work as expected. If you are not ready to install .NET 8 yet just skip the autoupdate by clicking the Not now button.
Best,
Atanas Korchev,
on behalf of the Radzen Team
I found errors in both my non RBS app and my main RBS app this morning after attending the conference online and upgrading VS2022 to 17.7.7. I also installed new Net 8.
They had run fine before the 2 upgrades.
SOLUTION:
I found in my case; current code runs fine in the VS 2022 Preview.17.9
We are currently running latest .NET 8 SDK with current (pre .NET 8) Radzen Blazor Studio without any issues. We have been doing this for months. Maybe Visual Studio is the culprit and removes the .NET 7 SDK.
As I said we are have been using current official RBS with .NET 8 for a couple of months now. It will work as long as you also have .NET 7 SDK installed.
If you are asking for the ability to create .NET 8 Blazor Web applications - you will have to wait for the next release then. Until then I suggest checking how the new Blazor rendering modes work as it catches a lot of developers by surprise: ASP.NET Core Blazor render modes | Microsoft Learn
You can just download an earlier version. However the .NET 8 requirement does not mean that your apps must use .NET 8 too. You can still develop .NET 7 apps with the latest version.
Learned of a correction if RBS code doesn't run in VS 2022 17.8.
I found that in the Installer, the checkmarks for .net6 , net7 webassembly buildtools were left off, which checked and updated. 17.8 works fine again on RBS ciode,
I have a .NET 7 webassembly project. After changing the framework of both client and server projects to .NET 8, updated all nuget packages all seemed ok. It compiled with no errors. I have only one runtime error in all components that have RadzenTemplateForm:
Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: The model must be a reference-typed object. (Parameter 'model')
System.ArgumentException: The model must be a reference-typed object. (Parameter 'model')
at Microsoft.AspNetCore.Components.Forms.FieldIdentifier..ctor(Object model, String fieldName)
at Microsoft.AspNetCore.Components.Forms.FieldIdentifier.Create[String](Expression1 accessor) at Radzen.FormComponent1[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetParametersAsync(ParameterView parameters)
at Microsoft.AspNetCore.Components.Rendering.ComponentState.SupplyCombinedParameters(ParameterView directAndCascadingParameters)
The problem doesn't seem related to RBS as you are posting screenshots from Visual Studio.
From the exception it looks as if you are trying to use a model instance which is not of reference type e.g. a struct or something similar. Here is the relevant code that throws this exception - it comes from Blazor itself.