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中的配置

猜你喜欢

转载自www.cnblogs.com/Lulus/p/12028942.html
今日推荐