How to handle "RunCommand property is not defined" issue?

AnonymousKKYY 20 Reputation points
2025-04-21T08:40:14.7033333+00:00

Here I have a .NET 6 ASP.NET project. When run IIS Express, it pops "RunCommand property is not defined".

User's image

User's image

ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
414 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 74,936 Reputation points
    2025-04-21T16:07:39.6333333+00:00

    an asp.net core application should be a console app, not a class library. also in the project file it should specify the web sdk:

    <Project Sdk="Microsoft.NET.Sdk.Web">
    
      <PropertyGroup>
        <TargetFramework>net6.0</TargetFramework>
        <Nullable>enable</Nullable>
        <ImplicitUsings>enable</ImplicitUsings>
      </PropertyGroup>
    
    </Project>
    
    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.