C# – A project with an output type of class library cannot be started directly (2)

c

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.

While running the program in C# visual studio 2010 I am getting this error. Please tell me how to sort out this error?

Best Answer

Set your startproject in the project explorer by clicking right mouseclick on an executable project and choose "Set as start project"