Config Transformation on NLog does not work

前端 未结 10 1720
悲&欢浪女
悲&欢浪女 2021-02-05 09:15

I have a web project (ASP.NET MVC 4 project) that has a number of configurations stored in Web.Config and in NLog.config files.

I have

10条回答
  •  离开以前
    2021-02-05 10:00

    The accepted answer did not work for me.

    I wanted to have internal logging locally, but not on production. It turns out you need to include the namespace in the root configuration node.

    What worked for me: web.config:

    
      
        

    web.config.Release

    
      
       >
       
      
    

    Found the solution here: https://www.jayway.com/2011/11/14/web-config-transformations-and-xml-namespaces/

提交回复
热议问题