Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Azure CloudService:将诊断扩展添加到角色<;XYZ>;失败_C#_Visual Studio_Azure_Azure Cloud Services_Diagnostics - Fatal编程技术网

C# Azure CloudService:将诊断扩展添加到角色<;XYZ>;失败

C# Azure CloudService:将诊断扩展添加到角色<;XYZ>;失败,c#,visual-studio,azure,azure-cloud-services,diagnostics,C#,Visual Studio,Azure,Azure Cloud Services,Diagnostics,当我尝试使用Visual Studio 2015中的服务器资源管理器在Azure云服务webrole上启用诊断时,不断出现此错误: 向角色添加诊断扩展失败:验证失败 在扩展的PublicConfig元素上,出现错误:元素 命名空间中的“度量” 'http:schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration' 内容不完整。预期可能的要素清单: 命名空间中的“MetricAggregation” “http:sc

当我尝试使用Visual Studio 2015中的服务器资源管理器在Azure云服务webrole上启用诊断时,不断出现此错误:

向角色添加诊断扩展失败:验证失败 在扩展的PublicConfig元素上,出现错误:元素 命名空间中的“度量” 'http:schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration' 内容不完整。预期可能的要素清单: 命名空间中的“MetricAggregation” “http:schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration”。Microsoft.Cct.StatusWindow.DispatchedStatusItemContainer

在我选择一个存储帐户,然后在诊断配置中单击“确定”后,会弹出此消息

如何成功启用诊断


为什么选择服务器资源管理器而不是web角色设置?这是您需要的,甚至更多—应用程序洞察力


因为我们不使用visual studio进行部署,而是使用powershell脚本。我已更新了脚本,通过调用“New AzureDeployment”和“Set AzureDeployment”中的参数“-ExtensionConfiguration”来包括诊断配置。我同意这是一个更好的解决方案,但VisualStudio显示了这样一个错误,并且没有提示我做错了什么,这仍然让我感到困扰。:)您是否在visual studio中安装了最新的azure工具?