Design time build failed (The name 'InitializeComponent' does not exist in the current context.)

Starting Radzen.Server on port 4000
Connected to Radzen.Server
Waiting for any pending restore operations...
Waiting for packages to restore...
Restore complete.
Solution is up to date.
Opening project C:\Users\Glaz_almaz\source\repos\MauiApp1\MauiApp1.sln
C:\Users\Glaz_almaz\source\repos\MauiApp1\MauiApp1\App.xaml.cs(7,13): error CS0103: The name 'InitializeComponent' does not exist in the current context.
C:\Users\Glaz_almaz\source\repos\MauiApp1\MauiApp1\MainPage.xaml.cs(7,13): error CS0103: The name 'InitializeComponent' does not exist in the current context.

I'm using:
Microsoft Visual Studio Community 2022 (64-bit) - Version 17.14.9

dotnet --list-sdks
8.0.412 [C: \Program Files\dotnet\sdk]
9.0.108 [C: \Program Files\dotnet\sdk]
9.0.302 [C: \Program Files\dotnet\sdk]