【发布时间】:2015-05-27 06:09:57
【问题描述】:
我正在尝试让 NLog 与 Microsoft Application Insights 一起使用。我按照这里的说明进行操作:
上述说明让我通过获取 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 包,但无济于事。
有什么建议吗?
【问题讨论】:
-
我的第一个建议是升级到更新的、基于 Azure 门户的 App Insights 版本。 0.7.0.0 版本已经很老了(当前是 0.13.x.y),所以您可能会遇到已经修复的问题?
标签: nlog azure-application-insights