我最近更新了我的VS到2022年。我的项目是Azure函数应用程序。
但是,当我单击调试项时,将得到以下错误。
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.
通常,当我的函数应用程序运行时,我的提示屏幕就会出现。
有什么问题吗?
发布于 2021-12-29 09:21:13
我让它起作用了。似乎在安装期间,Azure开发没有被选中。
发布于 2021-12-29 04:58:30
尝试清洁和重建你的项目。此外,如果有多个项目,请尝试设置一个启动项目,然后编译相同的项目。
这里有几个你可以尝试的解决办法
如果上面的内容不能工作,请尝试将一个新项目添加到您的解决方案中,并设置控制台应用程序或Windows的输出类型。为此,您可以通过右键单击项目导航到属性。
参考资料: A project with an Output type of Class Library cannot be started directly
发布于 2021-12-29 04:10:19
奇怪的是,因为azure函数在VS2022中工作,对我来说没有任何问题,您的函数中使用的是哪个版本的目标框架?
https://stackoverflow.com/questions/70513242
复制相似问题