Not able to add a View in Visual Studio 2022 .net 6

srivatshan br 0 Reputation points
2024-04-20T14:16:48.7133333+00:00

I'm trying to add View in .net and getting below error popup. Kindly assist me to resolve this.

I'm using .net 6 and visual studio 2022 community version.

User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,620 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,801 Reputation points Microsoft Vendor
    2024-04-22T06:39:21.2633333+00:00

    Hi @srivatshan br

    Welcome to Microsoft Q&A! 

    Does it occur in specific project or all projects? 

    I created an ASP.NET Core MVC project (.NET 6.0) and tried to add a View by right-click on the Views folder > Add > View. It works normally on my side. 

    Please open the Visual Studio Installer and update your VS2022 to the latest version.

    You can also try to repair the VS in the Visual Studio Installer > More > Repair

    Then, re-launch the VS2022 and create a new project to add a View. Or try a different target framework, such as .NET 8.0. 

    If it persists, please share us the detailed information to investigate it further. 

    Sincerely,

    Anna


    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.

     

     

    0 comments No comments