提问人:Lev Gelman 提问时间:11/16/2023 更新时间:11/18/2023 访问量:66
VS Code 无法 Azure 函数扩展订阅错误
VS Code Can't Azure Function Extension subscription error
问:
我尝试使用 VS Code 创建一个新的 python Azure 函数, 我可以在我的订阅中列出资源组I can list of a resource groups in my subscriptions (我是订阅的所有者)
但是当我尝试创建一个新函数(python - 3.11 - 消耗)时
我收到此错误:
订阅数量正常
我尝试 Azure 注销并登录,即使使用机器代码, 我还重新启动了整台计算机。
我有 VS Code 的 1.84.2,这是最后一个,什么都无法更新
我能做些什么来解决这个问题?
谢谢!
答:
即使我遇到了这个错误,为了解决这个错误。访问 VS CODE 中的帐户设置,并在 settings.json 文件中指定 Azure TenantID/SubscriptionID。重新加载 VS 代码并尝试创建函数应用,请参阅以下内容:-
我的settings.json在azure.resourceFilter中包括tenantid / subscriptionid :-
请确保编辑 settings.json 文件,以包含指定 Azure 租户和订阅 ID 的 azure.resourceFilter 设置。我有两个 Azure 帐户,因此,我指定了两个设置:-
我的settings.json:-
{
"workbench.colorTheme": "Default Dark Modern",
"azure.resourceFilter": [
"xxxxxTenantIDxxx7cd011db47/xxxxSubscriptionID-xxx3f",
"xxxxxTenantID7xxxx95/xxxxSubscriptionIDxxxe2b6e97cb2a7"
],
"go.toolsManagement.autoUpdate": true,
"circleci.hostUrl": "",
"yaml.schemas": {
"file:///c%3A/Users/username/.vscode/extensions/atlassian.atlascode-3.0.7/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
},
"editor.inlineSuggest.enabled": true,
"workbench.editorAssociations": {
"*.avro": "default",
"*.pkl": "default"
},
"durableFunctionsMonitor.showWhenDebugSessionStarts": true,
"settingsSync.ignoredExtensions": [
],
"settingsSync.ignoredSettings": [
]
}
{
"workbench.colorTheme": "Default Dark Modern",
"azure.resourceFilter": [
"TenantID/SubscriptionID",
"TenantID/SubscriptionID"
],
"go.toolsManagement.autoUpdate": true,
"circleci.hostUrl": "",
"yaml.schemas": {
"file:///c%3A/Users/username/.vscode/extensions/atlassian.atlascode-3.0.7/resources/schemas/pipelines-schema.json": "bitbucket-pipelines.yml"
},
"editor.inlineSuggest.enabled": true,
"workbench.editorAssociations": {
"*.avro": "default",
"*.pkl": "default"
},
"durableFunctionsMonitor.showWhenDebugSessionStarts": true,
"settingsSync.ignoredExtensions": [
],
"settingsSync.ignoredSettings": [
]
}
保存 settings.json 文件,然后重新加载 VS Code 并再次尝试创建函数。
根据 ANANTHA BALAJI 的这个 SO 线程答案。D 尝试删除缓存在应用数据文件夹中的上述用户,该文件夹将在此处找到 - C:\Users\user\AppData\Roaming\Code\User
,然后再次尝试安装 Azure Functions 扩展。
尝试再次卸载并重新安装 Azure Functions 扩展,然后重新加载 vs 代码:-
尝试通过 View > 命令登录 Azure 帐户 Pallette > Azure:登录 > 系统将提示你登录帐户, 登录到 Azure 帐户 > 成功后登录 > 转到 Azure 扩展并再次尝试创建函数应用:-
并创建您的函数:-
单击底部的登录帐户,然后选择您的订阅:-
从本部分验证 Azure 帐户:-
评论