web.config file transform from command line

前端 未结 4 1675
暖寄归人
暖寄归人 2020-12-08 02:27

I have two build environments to target; Release and Staging. The Web.config looks like this:

     
    

        
4条回答
  •  轮回少年
    2020-12-08 03:26

    Jonathan's answer is good. I tweaked it slightly to allow the original Web.config file to be retained. These are the lines I added to the bottom of my .csproj file:

      
      
        
        
      
      
        
        
      
    

    I can see that the web.config file is transformed by running a build within Visual Studio (or from a command line).

提交回复
热议问题