How can I use Web.debug.config in the built-in visual studio debugger server?

前端 未结 7 660
花落未央
花落未央 2020-11-27 02:34

How can I merge and make use of Web.debug.config in visual studio 2010 built-in debugger?

7条回答
  •  自闭症患者
    2020-11-27 03:32

    This is actually quite simple to do and, believe it or not, it seems this is the way VS is designed to work.

    Add the following lines verbatim right before the closing "Project" tag of the .csproj file of the project that contains web.config.

    
    
        
        
    
    

    Put the following lines verbatim to the post-build event in the project properties of the project that contains the web.config file. Do this for each build configuration you want the transformations to run for.

    "$(MSBUILDBINPATH)\msbuild" "$(ProjectPath)" /t:Transform /p:Configuration=$(ConfigurationName);Platform=AnyCPU
    xcopy "$(ProjectDir)obj\$(ConfigurationName)\Web.Config" "$(ProjectDir)". /F /R /Y
    

提交回复
热议问题