相关疑难解决方法(0)

ASP.NET Core MVC应用程序洞察在升级到.NET Core 1.1.1后停止工作

我有一个简单的ASP.NET核心应用程序,我在2016年12月工作.它在应用程序见解和遥测方面工作得很好.

现在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" …
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net-core-mvc azure-application-insights asp.net-core

8
推荐指数
1
解决办法
3901
查看次数