You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在IntelliJ本地运行Azure Function时遇“Failed to get version of function(null)”错误

解决IntelliJ本地运行Azure Function报错“Failed to get version of function(null)”的方案
  • 检查Azure Functions Core Tools的系统环境变量
    确保azfunc或func命令能在系统终端(非IntelliJ内置终端)正常执行,输入func --version能返回有效版本号。如果执行失败,手动把Core Tools的安装路径添加到系统PATH变量:Windows默认路径一般是C:\Program Files\Microsoft\Azure Functions Core Tools,Mac/Linux通常是/usr/local/azure-functions-core-tools。

  • 手动指定IntelliJ中Core Tools的路径
    打开IntelliJ的设置(Settings -> Tools -> Azure Functions),不要依赖自动检测,直接点击浏览按钮,选中Core Tools安装目录下的func.exe(Windows)或func(Mac/Linux)可执行文件,保存后重启IntelliJ重试。

  • 清理IntelliJ的插件缓存
    关闭IntelliJ,找到对应缓存目录:

    • Windows: C:\Users\<你的用户名>\.IntelliJIdea<版本>\system\caches
    • Mac: ~/Library/Caches/JetBrains/IntelliJIdea<版本>
    • Linux: ~/.cache/JetBrains/IntelliJIdea<版本>
      删除其中带azure字样的缓存文件夹,或者直接清空caches目录,之后重新打开IntelliJ。
  • 核对项目Runtime版本与Core Tools兼容性
    打开项目根目录的host.json,确认version字段和已安装的Core Tools版本匹配:Core Tools v4对应runtime 4.x,v3对应3.x。版本不匹配的话,要么修改host.json的version值,要么安装对应版本的Core Tools。

  • 重置Azure插件配置
    进入Settings -> Plugins,找到Azure Tools,点击右侧齿轮图标选择Uninstall,卸载后先重启IntelliJ,再重新安装最新稳定版的Azure Tools插件,安装完成后再次重启IntelliJ并重新配置路径。

内容的提问来源于stack exchange,提问作者Onki

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 22:05:17