在 Visual Studio 2010 中,在包管理器控制台中,我键入:
Install-Package NLog -Version 2.0.1
我得到了2.0.0(在磁盘上)。在Codeplex上没有2.0.1版本。由于错误,ServiceStack.Logging.NLog 需要2.0.1版本:
Can't load file 'NLog, Version=2.0.1.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c' or one of it dependencies. (Exception HRESULT: 0x80131040)
2.0.1版也列在 NuGet 可用包中。
我已经替换了最新的ServiceStack v3 快照NLog.dll
中的文件,并且我的程序运行良好(ASP .Net4 Web 应用程序),但这不是很长时间的解决方案。在 ServiceStack中,快照是2.0.0和1.0.8。ServiceStack.Logging.NLog.dll
NLog.dll
ServiceStack.Logging.NLog.dll