IntelliSense not working in VS 2022 for a single aspx file.

舒阳 施 20 Reputation points
2023-11-16T04:57:44.84+00:00

I new a web form in VB (the same question in C#) without new a project. While the automatic completion not work in VS 2022.

not working in VS 2022.

I'm sure I have installed IntelliCode and enabled it in Tools->options->Auto list members. And this function even works well with Python.

User's image

This function works well in VS 2019 (also a single aspx file without build a project), but why it doesn't work in 2022?

It works well in VS 2019.

Looking for your reply! Thanks a lot!

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,535 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,249 questions
{count} votes

Accepted answer
  1. QiYou-MSFT 4,326 Reputation points Microsoft Vendor
    2023-11-16T07:31:13.8933333+00:00

    Hi @舒阳 施

    1. You can upgrade your "Target Framework" to .NET Framework 4.8.1.

    PNG1

    PNG2

    2.For your second question**< asp:xxx >** can't be completed because you placed it in the wrong place. It must be placed in <html>.

    PNG3

    Best regards,
    Qi You


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. 舒阳 施 20 Reputation points
    2023-11-16T08:38:09.37+00:00

    I have solved this problem by myself. This is my fault.

    A Web.config file is nessary.

    <?xml version="1.0" encoding="utf-8"?>  <configuration>   <system.web>     <compilation debug="true"  targetFramework="4.7.2" />   </system.web> </configuration>
    

    I'm terribly sorry for wasting @QiYou-MSFT time. And thinks for your advice again!

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.