简体   繁体   English

Output 类型为 Class 库的项目无法直接启动,Azure Z86408593C24AF77FDD90DF93 中的 Z86408593C24AF77FDD90DF93

[英]A project with an Output Type of Class Library cannot be started directly , Azure Function in VS 2022

I have recently updated my VS to 2022. My project is Azure Function App.我最近将我的 VS 更新到 2022。我的项目是 Azure Function 应用程序。

But when I click on debug item, I am getting the following error.但是当我单击调试项时,我收到以下错误。

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.

Usually, I prompt screen would appear with my Function app running.通常,我的 Function 应用程序运行时会出现提示屏幕。

What could be the issue?可能是什么问题?

Strange, because azure function work in VS2022 without any issue for me, which version of target framework is used in your function?奇怪,因为 azure function 在 VS2022 中工作对我来说没有任何问题,您的 function 中使用了哪个版本的目标框架?

Try cleaning and rebuilding your project.尝试清理和重建您的项目。 Also, if you have multiple projects try setting up a startup project and then compile the same.此外,如果您有多个项目,请尝试设置一个启动项目,然后编译相同的项目。

Here are few workarounds that you can try您可以尝试以下几种解决方法

  1. Try cleaning and rebuilding your solution.尝试清理并重建您的解决方案。

  2. If you have multiple projects try setting up a startup project and then compile the same.如果您有多个项目,请尝试设置一个启动项目,然后编译相同的项目。

    在此处输入图像描述

  3. If the above doesn't work try adding a new project to your solution and set Output Type of either Console Application or Windows Application.如果上述方法不起作用,请尝试将新项目添加到您的解决方案中,并将 Output 类型设置为控制台应用程序或 Windows 应用程序。 For this you can navigate to your properties by right clicking on your project为此,您可以通过右键单击您的项目导航到您的属性

REFERENCES: A project with an Output type of Class Library cannot be started directly REFERENCES: Output 类型为 Class 库的项目无法直接启动

I got it working.我让它工作了。 Seems that during installation Azure Development was not selected.似乎在安装过程中没有选择 Azure Development。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 azure worker role无法直接启动具有类库的输出类型的项目 - azure worker roleA project with an Output type of Class Library cannot be started directly 你能直接从 VS2022 发布一个新的独立 Angular 项目 (esproj) 到 Azure 吗? - Can you publish a new standalone Angular project (esproj) directly from VS2022 to Azure? 在 Azure Function 项目中添加对类库的引用导致未找到程序集 - Adding Reference to Class LIbrary in Azure Function project causes assembly not found Azure Function v1 使用 VS 2022 与 Azurite 与 AzureStorageEmulator 发生冲突 - Azure Function v1 using VS 2022 Conflict with Azurite vs AzureStorageEmulator 将Visual Studio类库项目部署到Azure - Deploy Visual studio class library project to Azure 发布时无法配置 Microsoft Identity Platform.Net Core 3.1.4 项目 + VS 2022 + Azure - Unable to configure Microsoft Identity Platform while publishing .Net Core 3.1.4 project + VS 2022 + Azure 使用 .Net6 (VS2022) 创建的持久 Azure 函数在本地进行调试,导致找不到源 - Durable Azure Function created with .Net6 (VS2022) debugging locally giving Source Not Found 命名空间不能直接包含Azure Function应用程序中的成员 - A namespace cannot directly contain members in the Azure Function App 如何使 azure function 使用 VS2022 发布的最新代码 - how to make azure function use the latest code published from VS2022 Azure function 从 class 库调用方法? - Azure function invoke method from a class library?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM