1

我想试试Microsoft.ApplicationInsights遥测。文档声称 TelemetryContext应该在Microsoft.ApplicationInsights.Contracts命名空间中,但是当我从 nuget获取Application Insights for WebMicrosoft.ApplicationInsights时(它让我成为依赖项),它似乎没有Contracts

Microsoft.ApplicationInsights.Contracts nuget search 没有结果

我必须在这里遗漏一些明显的东西。

4

2 回答 2

1

MSDN 上的文档似乎已过时。

在 Application Insights SDK 的 1.1(我假设您正在使用的最新版本)中,TelemetryContext在此命名空间中具有:(Microsoft.ApplicationInsights.DataContracts请注意 DataContracts 不仅仅是 Contracts)。我使用 Resharper 让它找到TelemetryContext该类,并在核心包 (Microsoft.ApplicationInsights) 的这个命名空间中找到它。

SDK 发行说明没有具体提及有关此命名空间移动的任何内容,但https://azure.microsoft.com/en-us/documentation/articles/app-insights-release-notes-dotnet/

于 2015-07-23T13:27:24.630 回答
1

API 文档现已更新。很抱歉给您带来不便,并感谢您指出这一点。

于 2015-08-11T00:36:31.383 回答