我正在尝试让 NLog 与 Microsoft Application Insights 一起使用。我按照这里的说明进行操作:
如何将 Microsoft Application Insights 与 NLog 一起使用(找不到目标:'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 包,但无济于事。
有什么建议么?