I'm currently using VS 2019 Professional and TFS as my source control. I've created an XML file on Notepad++ and placed it in a location that TFS is aware off in file explorer.
Usually with older version of VS, I would be able to right click the file and select "Add" under the TFS extension. From what I can see, this option is no longer available for 2019: Team Foundation Server Power Tools for Visual Studio 2019
I've tried going down the path of using the dev command prompt and set a system variable with the
name: tfs
value: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
and once I attempt to run the following command: tfs add myFile.XML with the CD path set to where I want the file added, I receive the error:
'tfs' is not recognized as an internal or external command,
operable program or batch file.
Was hoping to see if there's anything I was doing wrong here or if there's another way I can go around to achieve adding a file?
Just in case anywhere stumbles across this in the future, on VS if you go to the Source Control Explorer Screen, navigate to the directory you'd like the file added to then right click anywhere on the screen and select Add items to folder
Related
It's clear if you use Team Explorer in Visual Studio 2017 to create your new team project, the reports folder will be created and the default reports added.
However, my classmate used web interface instead to create a new team project, which does not create the reports folder for that new team project.
I didn't find a way to add report for that existing project after go through everywhere in web portal. Is it possible to do this?
I'm using TFS2017
You could use TFSConfig command line to handle this.
To add the reports folder use the following steps.
Log onto your TFS server
Open a command prompt as an administrator
Navigate to the C:\Program Files\Microsoft Team Foundation Server
1x.0\Tools directory Enter the following command, entering the
appropriate values for each parameter.
TFSConfig addprojectreports /collection:”http://yourtfsserver:8080/tfs/DefaultCollection” /teamproject:”Patrick” /template:”Agile”
This command will create a report site and folder. It will report its progress and output to the screen and a log file as it goes. Hope this helps.
I have some project A which is checked in to some folder within the Team Project long time back by somebody else. I have to where it is located. do i have any command to search the file or project file within the team project. I have many team projects within the project collection.
If you're searching for a file and know the name of it, you can do it from the commandline (Visual Studio Command Prompt) using tf.exe.
tf dir $/TeamProjectName/FileName.csproj /recursive /s:http://tfsserver:8080/tfs/CollectionName
I have VS 2010 and a TFS 2010 server set up and it's all working fine. I've checked out files to my local hard drive.
I installed the TFS Power Tools to be able to get to TFS through context menu in Windows. If I right click in a TFS project on my hard drive I get all the icons and it works.
My question is that how do I get the TFS menu if I have no source code from TFS on my hard drive?
Regards,
Magnus
"how do I get the TFS menu if I have
no source code from TFS on my hard
drive?"
First, you need to define a workspace and map server (source control) paths to local directories. You can do this in either of two ways:
Use the tf workspace command to define a new workspace.
Use Source Control Explorer to Create a Workspace and Get Files.
Once you've setup your workspace, you can right click any file or folder in your workspace you will find a Team Foundation Server option, expand it and you will see other version control options like checkout, check-in etc.
When I build my solution, it dumps all the binaries into one folder. How can I cause it to split up the files by project like Visual Studio does?
Just edit your TFSBuild.proj file for the build, and add this to opne of the property groups:
<CustomizableOutDir>true</CustomizableOutDir>
This will automatically then cause the build to output the build output as per normal (like Visual Studio).
In Team Foundation, you can ask Team Explorer to show deleted files by doing this:
Tools > Options > Source Control >
Visual Team Foundation Server > Show
deleted items in the Source Control
Explorer.
My question is how do you do the same thing programmatically?
I am developing a synchronisation tool, and I need to detected deleted files in TFS. Workspace.Get(...) returns only non-deleted files.
Any idea how I can achieve that?
Go to the Visual Studio folder in your start menu and start up a Visual Studio Command Prompt from the "Visual Studio Tools" subfolder.
The command you want to run is:
tf dir /server:myserver $/myproject /recursive /deleted
(where myserver and myproject are your server and project)
use "tf help" for general info, "tfs help dir" for more help on this command, or google on "tf.exe" for more info.
The VersionControlServer.QueryHistory API will give you access to the changesets which will contain all version control operations including deletes.