C# · 12月 25, 2021

c# – Azure SDK 2.5中不推荐使用的类

我们目前正致力于将Azure SDK版本从2.2升级到2.5,这是目前的最新版本.

当我这样做时,我注意到以下类被标记为已弃用:
DeploymentDiagnosticManager
DiagnosticMonitorConfiguration
DiagnosticMonitor

当我进入关于这些类的MSDN页面时,它没有任何异常.
http://msdn.microsoft.com/en-us/library/azure/microsoft.windowsazure.diagnostics.diagnosticmonitorconfiguration.aspx

当这些类被弃用时,有没有人知道我应该用于诊断?

解决方法 查看Azure SDK for .NET 2.5发行说明的 Breaking Changes时:

Diagnostics configuration in code is no longer supported – With the Azure SDK version 2.5,all diagnostics configuration must be done in the XML configuration file diagnostics.wadcfgx. Any prevIoUs code-based diagnostics configuration (for example,using the DiagnosticMonitor API) must be migrated to the diagnostics.wadcfgx file. Code used to configure crash dumps in prevIoUs SDKs must also be migrated to the diagnostics.wadcfgx file.