我有一个简单的ASP.NET Core应用程序,我在2016年12月曾经在上面工作过。它可以正常使用应用程序洞察和遥测功能。
现在,4个月后,我想拾起这项工作,并从.NET Core 1.1.0升级到1.1.1。在此过程中,包
不幸的是,这导致我的应用程序停止工作,特别是出现以下错误:
现在,4个月后,我想拾起这项工作,并从.NET Core 1.1.0升级到1.1.1。在此过程中,包
Microsoft.ApplicationInsights.AspNetCore
从版本1.0.2
更新到版本2.0.0
。不幸的是,这导致我的应用程序停止工作,特别是出现以下错误:
An error occurred during the compilation of a resource required to process this request. Please review the following specific error details and modify your source code appropriately.
/Views/Shared/_Layout.cshtml
'IHtmlHelper<dynamic>' does not contain a definition for 'ApplicationInsightsJavaScript' and no extension method 'ApplicationInsightsJavaScript' accepting a first argument of type 'IHtmlHelper<dynamic>' could be found (are you missing a using directive or an assembly reference?)
+
@Html.ApplicationInsightsJavaScript(TelemetryConfiguration)
Show compilation source
#pragma checksum "/Views/Shared/_Layout.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "050a2afdfb4a44e17be72e76627a3d3a0d0b7d5a"
namespace AspNetCore
{
#line 1 "/Views/_ViewImports.cshtml"
屏幕:
从 project.json 升级到新的 csproj 并使用新的 Visual Studio 2017 并没有帮助。
看起来 ApplicationInsightsJavaScript 基本上已经从 API 中移除了。那么,我该如何启用 JavaScript 应用程序洞察呢?