首页 > 解决方案 > 使用 msbuild 命令行转换 web.config

问题描述

希望设置 jenkins 来部署我的网络应用程序我正在使用脚本

msbuild WEB.csproj /p:Configuration=stage /t:Build /p:PrecompileBeforePublish=true /p:OutputPath=c:\test /p:DeployOnBuild=true /p:AutoParameterizationWebConfigConnectionStrings=False

我得到了 web 应用程序,_PublishedWebsite但是web.config需要转换。有小费吗?

标签: c#visual-studiojenkinsmsbuildweb-config-transform

解决方案


从这篇文章TFS 2012 没有将转换后的 Web.Config 复制到 _PublishedWebsite

添加/p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false到命令解决了这个问题


推荐阅读