一朋友发过来一个asp.net项目的代码,尝试在VS2017中运行,无法启动,提示:

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

网上查到了解决办法:

在解决方案浏览器中,选中web项目,右击,选中“Set as StartUp Project",

A project with an Output type of Class Library cannot be started directly_软件开发

然后VS顶部出现IIS选项,点击它,运行成功:

A project with an Output type of Class Library cannot be started directly_软件开发_02