Visual studio 2022 - The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project

Shunmuga Priya Kandasamy (INFOSYS LIMITED) 131 Reputation points Microsoft External Staff
2022-01-27T09:32:28.76+00:00

Hi Team,

The microsoft visual studio 2019 web and webapi projects when opened in visual studio 2022, getting the below error and cannot open it.Please guide me

The IIS Express applicationHost.config file contains invalid entries and must be corrected before you can open project

169031-image.png

Windows development | Internet Information Services
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
{count} votes

1 answer

Sort by: Most helpful
  1. Ken Tucker 5,861 Reputation points
    2022-01-27T10:25:42.01+00:00

    In the folder your solution is in delete the hidden folder .vs and try again. This will cause the file to be regenerated when you open the solution again.

    0 comments No comments

Your answer

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