azure - 如何在 Visual Studio 中的不同端口上运行 Azure Function 应用程序

标签 azure visual-studio-2017 azure-functions

我正在 local.setting.json 中设置本地主机端口。引用微软文档https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local

文件如下所示

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "",
    "AzureWebJobsDashboard": ""   
  },
  "Host": {
    "LocalHttpPort": 7073
  }
}

当我运行/调试解决方案时,VS 仍然在默认端口 (7071) 上托管应用程序

我已经检查了 bin 目录,local.setting.json 文件使用上述设置到达那里。 从 bin 目录运行 Azure Fucntion CLI (func host start) 正确读取端口号。

看起来 VS 没有使用“LocalHttpPort”端口。设置中是否还需要进行任何其他更改。我有 Visual Studio 2017 预览版 (2)

最佳答案

我使用的是 CLI 版本 1.2.1,项目属性 -> 调试 中的以下应用程序参数 设置对我有用。

主机启动 --port 7074 --nodeDebugPort 5860

关于azure - 如何在 Visual Studio 中的不同端口上运行 Azure Function 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44976890/

相关文章:

azure - 我的带有队列触发器的 Azure 函数应用程序未按应用程序服务计划进行扩展

visual-studio-2017 - Visual Studio 2017 中的 nuget 包引用蓝色图标

c++ - 如何在 visual studio 2017 c++ 上添加预处理器定义?

typescript - Azure Functions 可以是 Typescript 中的类吗?

azure - 在 Azure Functions 中将共享程序集的依赖项放置在何处

logging - Azure 函数 v2 : logging customization in host. json

azure - TFS 一次向多个 Azure VM 发布 : Copy setup. exe

asp.net-mvc - 从 Azure 中托管的 ASP.NET Core 5.0 MVC 站点调用 API/服务时出现间歇性套接字异常

azure - 将 Azure 服务总线替换为 Blob 存储

c++ - 无法在 visual studio 2017 (Native c++) 中禁用数据断点