当前位置: 动力学知识库 > 问答 > 编程问答 >

c# - Visual Studio Team Services Build Definition - How to Copy sources folder

问题描述:

I’m trying to create a build definition in Visual Studio 2013 using TfvcTemplate.12.xaml as template. One of my objectives is to copy the sources folder to the drop folder.

I already tried to use CopyDirectory method, but without success.

How can I copy the sources folder of my solution to the drop folder?

网友答案:

You can use the post-test PowerShell call to add a PowerShell script to your build that is called after tests have run.

You can call a "move-item" ps command to move the bits and you can access both the source and binaries location from the environmental variables.

http://msdn.microsoft.com/en-us/library/hh850448.aspx

http://msdn.microsoft.com/en-us/library/dn376353.aspx

网友答案:

If you are using Visual Studio online you can add (or edit) a Step called "Copy Files" to your build definition and add "***" to the "Content" field, it will include everything on the drop archive. Bear in mind that this might make your build process a lot slower (depending on the steps you have).

I'm not sure how easy it would be to replicate this behaviour using the Xaml templates but I assume it should be straight forward as well.

分享给朋友:
您可能感兴趣的文章:
随机阅读: