I would say this type of error typically occurs when you rename files, without using the built-in Rename functionality in Visual Studio. In my case, all variable names and inputs were correct in my Razor pages, but the namespace was still referencing the old name.