场景:.Net 4.0 MVC WebAPI 应用程序添加ApplicationInsights监控后在demo环境运行正常,发布到testing环境出现异常
异常信息:
Could not load file or assembly 'System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
解决方案:安装补丁:https://www.microsoft.com/en-us/download/details.aspx?id=3556
参考:https://stackoverflow.com/questions/23903657/could-not-load-file-or-assembly-system-version-2-0-5-0-in-net-4-mvc-4-applicat