Xamarin Assets文件读取

在Assets文件夹中添加nlog.config文件,在属性中将Build Action设置为AndroidAsset

var steam = Assets.Open("nlog.config");
var xmlReader = System.Xml.XmlReader.Create(steam);
NLog.LogManager.Configuration = new NLog.Config.XmlLoggingConfiguration(xmlReader, null);

NLog在Xamarin Android中的配置

posted @ 2019-12-12 14:25  Lulus  阅读(1835)  评论(0编辑  收藏  举报