how to fix "The project doesn't know how to run the profile with name IIS Express

Linsemon Jose 0 Reputation points
2023-11-27T20:19:45.94+00:00

Microsoft Visual Studio 2022, trying to debug an API, after upgrading to .Net Core 8 getting below error

The project doesn't know how to run the profile with name 'IIS Express' and command 'IISExpress'.

Any Suggestions please

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,379 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,408 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,869 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 27,731 Reputation points Microsoft Vendor
    2023-11-28T07:40:25.1133333+00:00

    Hi @Linsemon Jose

    Welcome to Microsoft Q&A! 

    What is your project type? I created a ASP.NET Core Web API project and it works fine. 

    Please check the Project element in the project file:

    <Project Sdk="Microsoft.NET.Sdk.Web"> 
    

    Then, reload your project and debug it again. 

    You can create a new project to check it again. 

    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.

     


  2. Linsemon Jose 0 Reputation points
    2023-11-28T09:18:45.0866667+00:00

    I have reinstalled VS 2022 Enterprise 17.8.1. The issue is gone away now. so there may be a bug in upgrade route.
    Have cleaned the machine to install it fresh. Thanks again.