简体   繁体   English

如何使 azure function 使用 VS2022 发布的最新代码

[英]how to make azure function use the latest code published from VS2022

I have a netcoreapp3.1 project with few functions.我有一个功能很少的 netcoreapp3.1 项目。 I made changes to one function and deployed using VS 2022 but when I test in Azure, I can clearly see it is using the older code.我对一个 function 进行了更改并使用 VS 2022 进行了部署,但是当我在 Azure 中进行测试时,我可以清楚地看到它使用的是旧代码。 I tried removing then adding the function from the project.我尝试从项目中删除然后添加 function。 Restarting the function app in azure and other refresh methods.重启azure中的function应用等刷新方法。

Will I only be able to get the new code if I delete and recreate the function app?如果我删除并重新创建 function 应用程序,我是否只能获得新代码? Is there another way to refresh the running code?是否有另一种方法来刷新正在运行的代码?

Once you have published your function to a FunctionApp throughout VisualStudio 2022 or VisualStudio Code, you can deploy updates to that function app.在整个 VisualStudio 2022 或 VisualStudio Code 中将 function 发布到 FunctionApp 后,您可以将更新部署到该 function 应用程序。 Eg if you have added a new HttpTrigger, you can publish all the code including the added HttpTrigger from Visual Studio itself.例如,如果您添加了一个新的 HttpTrigger,您可以从 Visual Studio 本身发布包括添加的 HttpTrigger 在内的所有代码。

Visual Studio 2022, just a black Azure Function App for testing purposes: Visual Studio 2022,只是一个黑色 Azure Function 应用程序用于测试目的:

  1. Doubleclick on "Connected Services"双击“连接的服务”
  2. Then in the left pane, click "Publish"然后在左窗格中,单击“发布” 在此处输入图像描述

Visual Studio Code ( Azure Tools plugin ): Visual Studio 代码( Azure 工具插件):

在此处输入图像描述

暂无
暂无

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

相关问题 Cloud Explorer等效调试VS2022用于上传到存储的压缩发布代码? - Cloud Explorer Equivalent Debug VS2022 for zipped published code uploaded to storage? 什么是 VS2022 等同于“用于 Visual Studio 代码身份验证的 Azure 身份插件”? - What is the VS2022 eqivalent to "Azure Identity Plugin for Visual Studio Code Authentication"? 使用 .Net6 (VS2022) 创建的持久 Azure 函数在本地进行调试,导致找不到源 - Durable Azure Function created with .Net6 (VS2022) debugging locally giving Source Not Found VS2022 中的发布目标缺少部署到 Azure 容器应用程序 - Deploy To Azure Container Apps is Missing from Publish Targets in VS2022 你能直接从 VS2022 发布一个新的独立 Angular 项目 (esproj) 到 Azure 吗? - Can you publish a new standalone Angular project (esproj) directly from VS2022 to Azure? 从 VS2022 登录时出现 Azure 错误 AADSTS50020 - Azure error AADSTS50020 while loggin in from VS2022 VS2022 配置 Azure keyvault 看不到本地 secrets.json - VS2022 Configure Azure keyvault not seeing local secrets.json 如何从 vs 代码发布 azure 函数? - How to publish azure function from vs code? Azure 功能:Blob 存储模拟器在移动到 VS2022 后停止工作 - Azure Functions: Blob Storage emulator stopped working after moving to VS2022 如何从发布的Web角色VS2012项目中的Powershell脚本运行Azure cmdlet - How to run Azure cmdlets from a powershell script in a published Web Role VS2012 project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM