5,450 questions
Try to create a new “Console App” project instead of “Console App (.NET Framework)”. In the New Project dialog, select “.NET 7.0” and optionally the “Do not use top-level statements” option.
Then copy your code from previous project. (Sometimes some adjustments are required).
The new versions are called “.NET” without “Framework”. You can find the details in documentation.