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

来源:互联网 发布:单片机学习网站 编辑:程序博客网 时间:2024/06/06 03:37
按F5调试时发现这个错误:
A project with an Output Type of Class Library cannot be started directly

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

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

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