解决微软云Azure Function运行报错-Value cannot be null. (Parameter ‘provider‘)

问题描述

在vscode中创建了本地函数,本地运行后等待半天然后显示以下错误。

Value cannot be null. (Parameter 'provider')

解决方案

手动通过func: host start --verbose运行,发现是因为没有成功下载extensionBundle。
打开host.json,将extensionBundle删除掉,重新运行即可。

{
    
    
  "version": "2.0",
  "logging": {
    
    
    "applicationInsights": {
    
    
      "samplingSettings": {
    
    
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  /// 以下代码删除
  "extensionBundle": {
    
    
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[2.*, 3.0.0)"
  }
}

如果用到了扩展包,那只能手动安装扩展包或者开代理来下载。

猜你喜欢

转载自blog.csdn.net/adojayfan/article/details/121833103