开发者

NLog not logging messages on XP SP3 with .NET 3.5 Client Profile

开发者 https://www.devze.com 2022-12-26 12:00 出处:网络
I\'m writing a program that is targeting the .NET 3.5 Client Profile and using NLog. I configure my logger programmatically on start up (no config file.)

I'm writing a program that is targeting the .NET 3.5 Client Profile and using NLog. I configure my logger programmatically on start up (no config file.)

It works perfectly on Vista and Windows 7, but when running on a fresh install of XP SP3 with the .NET Client Profile installed, it will not log any of the variables in the layout string. For example, with the layout string set to:

target.Layout = "MESSAGE: ${longdate}|${level}|${message}";

It will log "MESSAGE: | | |"

开发者_如何学JAVA

Again, this only happens on XP SP3, and the logger is set to throw exceptions. Any ideas what may be causing this?


Which version of NLog are you using? This should be a supported scenario in NLog 2.0, which comes with client-profile-specific assembly. You can download recent nightly builds from:

http://nlog-project.org/download.html

Let me know if it fixes the issue.


I had the same issue but SP1 solved it.

0

精彩评论

暂无评论...
验证码 换一张
取 消