你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
当 decorators (如 @description、 @allowed等)在不支持的上下文中使用时,这种诊断就会出现在文件中 .bicepparam 。 虽然装饰器在参数声明文件中仍然有效 .bicep ,但在参数文件中无效,且现在被明确禁止。
Description
这里不允许装修师。
级别
错误
Solutions
从Bicep参数文件中移除装饰器。 有关使用参数的更多信息,请参见 使用参数。
例子
以下示例提到诊断,因为 @description 装饰器被用于 .bicepparam 文件中。
using './main.bicep'
@description('The name of the storage account to create.')
param storageName = 'mystorageacct'
param storageSKU = 'Standard_LRS'
你可以通过拆除 @description 装饰器来修复诊断问题。
using './main.bicep'
param storageName = 'mystorageacct'
param storageSKU = 'Standard_LRS'
后续步骤
有关 Bicep 诊断的详细信息,请参阅 Bicep 核心诊断。