azure devops yaml msbuild不转换web.config
我在Azure DevOps中有一个新的YAML管道,其中包含以下任务:
- task: MSBuild@1
displayName: 'Build MgzJsonService'
inputs:
solution: 'apps/MgzJsonService/MgzJsonService.csproj'
platform: 'Any CPU'
configuration: 'Release'
msbuildArguments: '/p:OutputPath="$(build.artifactstagingdirectory)\MgzJsonService" /t:Build /m /p:RestorePackages=false /consoleloggerparameters:ErrorsOnly '
clean: true
构建完成并且将工件上传到上传后,我的Web.config不会使用web.release.config进行转换。
但是,当我两次添加相同的任务时,使用输出路径另一个文件夹,第二个构建确实使用web.release.config改变了我的web.config。
为什么只有两次构建项目才能起作用?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在任务中将以下内容添加到MSBuildArguments,已解决此问题:
“/p:usewpp_copywebapplication = true/p:pipelinedippedsonbuild = false”
我从:
Adding the following to the MsBuildArguments in the task fixed the issue:
"/p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false"
I got this answer from: https://stackoverflow.com/a/13128797/2074633