August 10, 2006

A project with an Output Type of Class Library cannot be started directly.

Problem:
A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, go to the Debugging tab under Configuration Settings in Project Properties, and set the Start Action to Start External Program or Start URL. Alternatively, you can add a non-library project to this solution that uses a reference to this project and set it as the startup project.


Category: Visual Studio
Solution: A libray project can't be a startup project becoz it does not contain aspx page.
Problem is you have selected start up project a library project so when you run project vs try to run a libary which can not be run. So to remove this problem right click on the website-project under your solution and select "Set as startup project" now press f5 visual studio will not show you error now. for further query comment below.

3 comments:

Anonymous said...

oh wonderful it worked, i wrongly selected the libary project as my default project thanks for the solution.

Anonymous said...

very helpful to me... couldnt get visual studio to debug an aspx website before seeing this.

Anonymous said...

I am really inѕpired with your ωriting skills
as wеll aѕ wіth the fοгmаt on уouг blοg.

Is thіs a pаіd topic οr did you
cuѕtοmizе it уourself?
Anyway keep up the nіce high quality
ωriting, іt is uncommon to peer a nice weblog like thiѕ
onе nowadays..
my web site: shorten Link