简体   繁体   中英

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:

/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=

And now run your regular build command.

Option 2: Delete all output folder rm /f /s "c:\dev\release"

Now run your regular build

Let me know solved it for you...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM