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

13 Comments

  1. Yoav
  2. Bobby
  3. Alex
  4. Salim
  5. Babak
  6. Mariner Eccles
  7. DLeh
  8. Euclides Marques
  9. KONAH
  10. SMR
  11. Swetha
  12. Rubi86
  13. koajca

Leave a Comment