Click here to Skip to main content
13,006,319 members (59,744 online)
Rate this:
Please Sign up or sign in to 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 30-Jul-12 10:00am
Wes Aday 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.
Wes Aday 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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.
Member 2178279 28-Apr-16 3:07am
Thanx its working for me.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

To get this off the unanswered list, this question was answered here[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170628.1 | Last Updated 23 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100