The .NET RID changed from .NET8, so I modified the PropertyGroup in the csproj file as follows.
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>Test</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x64</Platforms>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
</PropertyGroup>
I also modified the name and rid of the pubxml file.
After that, in the xaml editor, it initially normally referenced Microsoft.UI.Xaml.Controls namespace, but at some point, without knowing why, the error occurred by referencing the System.Windows.Controls namespace, and auto-completion did not work.
The error is not described, but by mouse-up and looking at the type of Grid, you can see that it is "System.Windows.Controls.Grid."
When I compile it, it works normally, but it's difficult to code due to bugs in the editor.
Does anyone know why this bug is happening?