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

Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    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

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.