Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

like image 297
user1577052 Avatar asked Sep 06 '12 14:09

user1577052


People also ask

How do you fix project with an output type of class library Cannot be started directly?

Solution. Right click on the Solution Explorer of your project in the right top corner of the IDE and the select the Properties option located in the dropdown menu. Now from the Solution Property Pages dialog that appears, select the StartUp Project list option.

How do you debug a project with output type class library?

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.

Can class library project run in C#?

This tutorial shows, how to build a simple Class Library . DLL in the C# Programming Language. The Class Library . DLL contains program code, data, and resources that can be can used by other programs and are easily implemented into other Visual Studio projects.


1 Answers

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

like image 171
CloudyMarble Avatar answered Sep 24 '22 19:09

CloudyMarble