简体   繁体   English

如何在 Jenkins 中使用 MSBuild 命令行覆盖目标文件

[英]how to overwrite destination file(s) using MSBuild command line in Jenkins

I am using MSBuild in Jenkins to generate a SharePoint package using the following command line:我在 Jenkins 中使用 MSBuild 生成 SharePoint ZEFE90A8E604A7C840E88D03A67F6B7 使用以下命令:

/p:Configuration=Release /p:OverwriteReadOnlyFiles=true /t:Package /p:BasePackagePath="c:\temp\"

Now, I would like to overwrite the destination file or files if they exist.现在,我想覆盖目标文件(如果存在)。 How can I do that?我怎样才能做到这一点? Thank you.谢谢你。

Option 1: You can simply run clean command first Msbuild "c:\dev\my.sln" /t:clean /p:configuration=选项 1:您可以先运行 clean 命令 Msbuild "c:\dev\my.sln" /t:clean /p:configuration=

And now run your regular build command.现在运行您的常规构建命令。

Option 2: Delete all output folder rm /f /s "c:\dev\release"选项2:删除所有output文件夹 rm /f /s "c:\dev\release"

Now run your regular build现在运行您的常规构建

Let me know solved it for you...让我知道为你解决了它...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用Jenkins MSBuild插件命令行将VS2010解决方案发布到ISS(本地) - Publish VS2010 Solution to ISS(local) using Jenkins MSBuild Plugin command line msbuild 的行为与命令行和 Jenkins 不同 - msbuild behaving differently from command line vs Jenkins Msbuild通过VS和命令行运行,但通过Jenkins失败 - Msbuild works via VS and command-line, but fails via Jenkins SonarQube MSBuild与Jenkins的集成失败,在命令行上工作正常 - SonarQube MSBuild integration failed with Jenkins, works fine on command line 在命令行中构建UWP应用(使用MSBUILD) - Building UWP app in command line (using MSBUILD) 如何从命令行上传文件作为 jenkins 中的文件参数 - How to upload file from command line as file parameter in jenkins 使用命令行配置Jenkins - Jenkins configuration using command line Jenkins无法运行MSBuild命令 - Jenkins fails running MSBuild command 如何使用robocopy编写命令行(使用jenkins)压缩一个文件夹? - How to write command line (in jenkins) using robocopy to zip one folder? 如何使用命令行将 Jenkins Slave 设置为作为 Windows 服务运行? - How to setup Jenkins Slave to run as a windows service using command line?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM