Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS-Studio 2015: How to automatically add a new class to Source Control on Check-In

We often "forget" to add newly created class files before checkin.

We are struggeling to find a way to automatically add new classes (or other project files which contain source code).

Any hints out there? Binding the solution to source control does not seem to help.

thx in advance

like image 474
Johannes Avatar asked Dec 07 '25 07:12

Johannes


1 Answers

Unfortunately, TFS will not auto scan the workspace folder to check if there have new files be added, you will have to add the new files in source control manually.

Please refer this Add Files to Version Control from MSDN, it tells you how to use VS to add a file that is not in a solution to version control.

And also you can use tfs command to achieve it. From a VS 2015 command prompt, navigate to the root directory and run

tf add *.<file extension> /recursive

Moreover, after you installed TFS Power Tools (the version of it must match to VS version) on your local machine, you also can right-click on workspace folder(team project or project folder) and select Team Foundation Server>>Add… to add files. enter image description here

like image 83
Chamberlain Avatar answered Dec 08 '25 21:12

Chamberlain



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!