zoukankan      html  css  js  c++  java
  • .Net Core入门与.Net需要注意的地方

    1.编码注册 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 否则抛出异常 'GB2312' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method. 2.默认运行程序根路径在netcoreapp2.1同级目录 3.兼容旧版xml配置文件 ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); 4.内部异常的抛出 //e.InnerException.PrepareForRethrow(); //throw e.InnerException; ExceptionDispatchInfo.Capture(e.InnerException).Throw(); 5.log4net接口变更 string Repository = "NETCoreRepository"; var log4netRepository = log4net.LogManager.CreateRepository(this.Repository); log4net.Config.XmlConfigurator.ConfigureAndWatch(log4netRepository, file); log4net.Config.XmlConfigurator.Configure(log4netRepository, file); var log = log4net.LogManager.GetLogger(this.Repository, name)

  • 相关阅读:
    硬件基础---拆装机
    Dynamics CRM 2015 Update 1 系列(4): 自己定义主键
    Heroku第三方服务接入指南(二)
    ssh 免密登录
    CentOS 7 NAT软路由
    Nginx升级
    挖矿病毒
    安装 epel-release
    hydra 安装和使用
    Linux 安全信息查看
  • 原文地址:https://www.cnblogs.com/guanglin/p/11119723.html
Copyright © 2011-2022 走看看