Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't manually add files to TFS

Tags:

tfs

We use Codesmith to generate some code, and when we open up the projects, the files are there, in the solution, but there is no way to check them in. The DLL compiles just fine. The only difference to the .csproj is the addition of any new files we generated.

But unlike VSS, TFS, does not detect these files. I validated this behavior by editing the .csproj manually. For some reason, the only way to add a file to TFS is through Visual Studio.

However, when I remove them from the project, and then include them, I get the usual yellow plus sign.

like image 861
Kevin Raffay Avatar asked Aug 03 '10 01:08

Kevin Raffay


2 Answers

You can manually add files to Visual Studio, however changing your project file isn't the best way to do this. If your project is already under source control and the files you want to add are visible in the Solution Explorer window, you can simply right-click a file and select Include in project. The next time you check your code in, the items will be added.

Since you're using TFS 2010, check out the Team Foundation Server Power Tools extensions. This includes the Windows Shell Extensions which give you integration into Windows Explorer which let's you right click on files or folders and add the to TFS outside of Visual Studio. Very nifty!

like image 64
dariom Avatar answered Oct 12 '22 05:10

dariom


Looks like it is not possible and the workaround is to batch-add all the files through PowerTools. Though this article/forum-thread is dated it appears to be helpful:
Adding CodeSmith generated source file in Team Foundation System

like image 42
Shankar R10N Avatar answered Oct 12 '22 04:10

Shankar R10N