TFS MSBuild Copy Files from Network Location Into Build Directory -
We are using TFS to make our solutions. We have some help files that we do not include in our projects because we do not want to allow our document writer to access the source. These files are placed in a folder on our network.
When the build kicks, we want to get the files from the network location to the process and place it in a help folder which is part of the source.
I have found an activity in xaml for the creation process named copydirectory. I think it can work, but I'm not sure which values will be used in the destination and the source properties. After making each success, the build is copied to the network location. We want to copy the file from one network location to the new build directory.
I can reach it wrongly, but any help would be greatly appreciated.
Thank you. First of all, you may want to consider placing your documentation in TFS for your documented authors. You can access a separate folder or project without access to your source code. The advantages are:
- Everything is under Source Control Files dropped in a network folder are easily misplaced or corrupted, and you do not have any history of their changes. Ideal for any project is that all the things related to this project have been taken into control, so that whenever you need, you can pick up a full historical version.
- You can not copy the document to perform the document such as making your server to another local folder that get "source code" is automatically copied, where desired.
The disadvantage is that you may need additional cal for that.
One more (more painstaking) approach is to let him save on network space, and a developer has to periodically check new files in TFS. If docs are not updated then this may be an acceptable agreement.
However, if you want to copy the docs from the net during your build, then you must enter the MSBuild
Copy commands (as you already know), or you
Exec can use . Copying is more complicated to use because often they are populated from the file name list that are generated from the output of other build targets, and are usually used with the solution-related pathnames. But if you are happy with DOS command (Excompy / Robocopy), then you can find just so easy to use Exec to run XCP / Robocopy commands. You can then "grow" and test excompie commands outside of the msubil environment and then paste it with confidence in MSBuild script that it will work - as part of your complete build process, copy settings Trial is very easy.
This example illustrates very well what you want to do, but in your case you can probably command with the full XCP / Robocopy command (or even the name of the batch file) Change the attribute, so that you want to use it, T is required to set up item group etc.
Comments
Post a Comment