Fix: A project with an Output type of Class Library cannot be started directly


You will sometimes come across the following error in a message box if you execute an ASP.NET application using Visual Studio 2005/2008

A project with an Output type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. 

Resolution

In order to fix the above error, right click the Solution name in Visual Studio 2005/2008 and select Set as StartUp Project option from the popup menu.

Applicability

Visual Studio 2005
Visual Studio 2008

Exit mobile version
Skip to toolbar