A project with an Output Type of Class Library cannot be started directly的解决

按F5调试时发现这个错误:
A project with an Output Type of Class Library cannot be started directly

原因是:把类库项目作为起始项目了,起始项目只能是可执行程序或者web程序

解决方法:在你要启动的项目上单击右键,选择Set as startup project 选择,这时会发现项目的字体已经变黑,表示现以该项目做为启动项目。

还要设置起始页,就是网站的首页。

你可能感兴趣的:(Web,Class,library,output)