Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting latest from tfs and then building the solution from a batch file

I have 8 vms, each having the product code. I've created an application using which I can trigger a codedui automation run remotely using mstest. Now the problem is, everytime I have to copy and paste the latest dlls on all the 8 vms to run the recently updated code and the transfering files from local machine to vm takes like eternity to copy over the network.

Is there a way by which I can create a batchfile using which I can download the latest code from the tfs server and then build my codedui test code on each of the VMs?

I know tf get and msbuild can be used for this but I do not know how to use it correctly as getting latest from the server would result in conflicts which needs to be resolved first before building the solution.

Is there a way to replace the entire solution using command line while performing get operation?

Is there a better approach to solve my problem.

Thanks!

like image 830
vivek singh Avatar asked Jan 16 '26 22:01

vivek singh


1 Answers

If you want to replace the entire solution and build from scratch I suggest you just delete the folder and then get it:

   rd /s MySolutionFolder
   tf get MySolutionFolder

But, this will of course take some time.

Unless you're editing files on the VM, tf get should not trigger any conflicts. If you are editing files, you can use a combination of tf get and tf resolve to deal with those issues. You could use something like this to ignore any conflicts and take the server version.

 tf get MySolutionFolder /recursive /noprompt
 tf resolve /auto:taketheirs
like image 154
Mikael Nitell Avatar answered Jan 19 '26 12:01

Mikael Nitell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!