The <App> parameter is utilized to locate the application's reference assembly. The issue stems from the fact that App is a Razor page rather than a class. Visual Studio occasionally fails to determine the namespace for a Razor page, which results in the error.
This has also been tested on VS 2026, with the same outcome.
Pending a resolution from Visual Studio, the workaround is to create the .cs code-behind file.