NLog不使用Application Insights

时间:2015-02-12 00:02:47

标签: nlog azure-application-insights

我正在努力让NLog与Microsoft Application Insights合作。我按照这里的说明进行操作:

How do I use Microsoft Application Insights with NLog (Target cannot be found: 'ApplicationInsights')

以上说明让我通过注册ApplicationInsights目标,但是,现在我收到此错误:

Could not load file or assembly 'Microsoft.ApplicationInsights, Version=0.7.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 

Line 10:     public class HomeController : Controller
Line 11:     {
Line 12:         private static Logger logger = LogManager.GetCurrentClassLogger();
Line 13: 

我对集会的注册方式不太熟悉,请原谅我在这里缺乏知识。我尝试删除然后从我的Web应用程序重新添加Application Insights,以及卸载并重新安装ApplicationInsights.NLogTarget Nuget Package,但无济于事。

有什么建议吗?

1 个答案:

答案 0 :(得分:1)

请升级到Microsoft.ApplicationInsights.NLogTarget NuGet包及其依赖项的最新版本(目前为0.17.0)。