Click here to Skip to main content
15,881,794 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have installed Async-CTP-v3 for using new feature of C# 5 but when I tried to run a console application using async keyword/await expression this error appeared:

"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."

Is there anyone can help me? Thanks.
Posted
Updated 28-Jan-21 2:31am
Comments
[no name] 30-Jul-12 16:01pm    
Change your project output type or change the startup project from a DLL to an exe project.
Sergey Alexandrovich Kryukov 30-Jul-12 18:45pm    
That is the real answer. I don't your Solution 1 is relevant. This is an error message from VS which OP could not understand -- you just explained it.
--SA
[no name] 30-Jul-12 18:51pm    
We both said the same thing, I think. OP just liked the SO answer better I think.
Sergey Alexandrovich Kryukov 30-Jul-12 19:17pm    
I did not say anything to OP -- you did. I just say, the real answer is above, not below.
--SA

You need to set as startup project.
Right click on your project and click set as startup project than will run your project
i hope this will help for you.
bye..
 
Share this answer
 
Comments
Member 2178279 28-Apr-16 3:07am    
Thanx its working for me.
To get this off the unanswered list, this question was answered here[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900