Config Transformation on NLog does not work

前端 未结 10 1820
悲&欢浪女
悲&欢浪女 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:11

    I also had this issue but in an ASP.NET MVC 5 project. I do not have any AfterBuild events only added one line in the csproj file in the tag for the NLog.config file:

    true
    

    It looks like this tells the msbuild.exe to do the transformation upon build. My setup is two files NLog.Debug.config and NLog.Release.config used for transformations based on build configuration (/p:Configuration="Release").

    
      Always
      true
    
    
      NLog.config
      True
    
    
      NLog.config
      True
    
    

提交回复
热议问题