Error with MAUI project

I created a new project in visual studio using the ".NET MAUI Blazor Hybrid and Web App" template. I followed this tutorial to add Radzen Blazor support. Everything worked great in visual studio.

When I try to edit any of the .razor files in Radzen Blazor Studio, I get this error:

C:\Program Files\dotnet\sdk\9.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file 'PATH_TO_MY_PROJECT\obj\project.assets.json' doesn't have a target for 'net9.0-windows10.0.19041.0'. Ensure that restore has run and that you have included 'net9.0-windows10.0.19041.0' in the TargetFrameworks for your project. [PATH_TO_MY_PROJECT\MY_PROJECT.csproj]

Workload updates are available. Run dotnet workload list for more information.

Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\GeneratedBindingInterceptorsCommon.g.cs(16,8): error CS0267: The 'partial' modifier can only appear immediately before 'class', 'record', 'struct', 'interface', or a method or property return type.

I was able to replicate the problem still not sure what's causing it. The project runs normally runtime both from command prompt and Radzen Blazor Studio - we will investigate it further and will post our findings.

We were able to identify and fix the problem and we will release update.

Impressive turnaround time :slight_smile: I look forward to the next update.

With the same project as above, I also have an issue with Radzen Blazor for Visual Studio. I know this is the wrong forum section for that but have to wonder if the root cause related.

When I try to use the .razor designer with the Visual Studio plug-in it shows nothing and I get the following error in the console output:

Microsoft.Maui.Controls.BindingSourceGen\Microsoft.Maui.Controls.BindingSourceGen.BindingSourceGenerator\GeneratedBindingInterceptorsCommon.g.cs(16,8): error CS0267: The 'partial' modifier can only appear immediately before 'class', 'record', 'struct', 'interface', or a method or property return type.

Both products share the same engine and thus same problems. The RBS update has already been released. You can give it a try.

I updated RBS to version 1.36.3 and the error about the 'partial' modifier is gone when I attempt to edit .razor files.

However the other error persists:

C:\Program Files\dotnet\sdk\9.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file 'PATH_TO_MY_PROJECT\obj\project.assets.json' doesn't have a target for 'net9.0-windows10.0.19041.0'. Ensure that restore has run and that you have included 'net9.0-windows10.0.19041.0' in the TargetFrameworks for your project. [PATH_TO_MY_PROJECT\MY_PROJECT.csproj]

I'm unable to reproduce such error using latest version of RBS and newly created .NET MAUI Blazor Hybrid and Web App with Radzen.Blazor components added as per our Getting Started: