Click here to Skip to main content
Rate this: bad
good
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 11:00am
z_azad471
Comments
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.
--SA
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.
--SA
Rate this: bad
good
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.
bye..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
0 OriginalGriff 275
1 DamithSL 265
2 CPallini 235
3 Maciej Los 185
4 George Jonsson 170
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


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