Click here to Skip to main content
11,715,022 members (66,445 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#5
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 at 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 at 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 at 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 at 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.
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
0 Sergey Alexandrovich Kryukov 530
1 Richard MacCutchan 275
2 Maciej Los 259
3 ManasKumarM 155
4 Frankie-C 115
0 Sergey Alexandrovich Kryukov 775
1 CHill60 415
2 Richard MacCutchan 405
3 Maciej Los 389
4 OriginalGriff 320

Advertise | Privacy | Mobile
Web04 | 2.8.150901.1 | Last Updated 23 Nov 2012
Copyright © CodeProject, 1999-2015
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