VSTS / TFVC cli for oracle developer - tfs

I am an oracle database developer. My organization is using VSTS repos for code storage. For people who are working with Visual studio, it is easy to check in codes. But for Db people, we always have to check-in the code manually by dragging in.
is there any way to connect to vsts repos source control with oracle tool? We are using TFVC as our version control (and not GIT).

According to your comment, seems you are using TFVC as your source control. Assuming you are working on windows platform, check in command should be the one you are looking for.
In the following examples, the %PathToIde% is usually on a path like
this: %ProgramFiles%\Microsoft Visual Studio 9.0\Common7\IDE, or on
Windows x64: %ProgramFiles(x86)%\Microsoft Visual Studio
10.0\Common7\IDE (depending on Visual Studio version and installation settings).
Example for get:
cd C:\TFS\Arquitectura
"%PathToIde%\TF.exe" get $/Arquitectura/Main /recursive
Example for checkout:
cd C:\TFS\Arquitectura
"%PathToIde%\TF.exe" checkout $/Arquitectura/Main /recursive
Example for checkin:
cd C:\TFS\Arquitectura
"%PathToIde%\TF.exe" checkin $/Arquitectura/Main /recursive
Source Link
If you are working on Linux, take a look at this blog-- Team Foundation Version Control and the Linux Command Line

Sounds like you should look at the TF.exe CLI. This CLI lets you pretty much do everything that you can in the VS GUI.
Here's a link to the Microsoft doc's for TF, Use Team Foundation version control commands

Related

How to integrate TFS in WebStorm?

I'm using Git with WebStorm's version control already, but have to use TFS version control. After some research fond this plugin but there is no tutorial that aiming to configure that plugin.
Can anyone guide me?
You can opt for using git tfs, locally you can still use Git and all of the advantages you're used to. And then push from git to TFVC. You'll need to install Team Explorer or the Team Explorer Cross Platform Commandline Tools.
Or you can use the native plugin for, thelatest version of the TFS / Azure DevOps (Server) plugin can be found on the Jetbrains site. It requires TFS 2015 or newer. You can use the plugin you found for older versions of TFS.
A good explanation to get started can be found here. The part to configure TFVC is replicated below.
Visual Studio Team Services plugin and TFVC
Before starting with TFVC, we need an external tool. The tool in question is TF command line tool. It ships with the Microsoft Team Explorer Everywhere 2015 and you can download it here.
The file we are interested in is TEE-CLC-14.0.3.zip. Download it and unzip it in a folder of your choice. You should end up with something similar to this.
Now, open the command prompt, move into the folder where you have extracted the TF command line tool and run the following:
tf eula /accept
If command succeeded and you haven’t received any error, you are good to go.
Now back to IDEA. Open the settings panel.
and move to Version Control -> TFVC pane. In the select path to executable field, enter the exact path to the tf.cmd command file located in TF command line tool folder.
Once done, press the test button and you should see the following message
Confirm all of the open windows and get back to the IDEA welcome page. Now you are ready to choose Team Services TFVC (Preview) version control.
At this point, same as for Git, you will be prompted about the connection towards your TFS. The following dialog will be shown.
Move to the Team Foundation Server tab and specify the address of your TFS server, then click connect. You will now be prompted for the credentials and if everything is ok, you will be shown the list of available TFVC repositories.
You can now create a new workspace directly from IDEA and start working with your TFVC repositories.

How can I connect to on-premises TFS using Visual Studio Code?

How can I connect to on-premises TFS using Visual Studio Code? Is that possible the same way as in Visual Studio?
If you need to use Git, all you need is Visual Studio Code. Git is a built-in feature.
In order to also use TFVC you'll need to install an extension. You'll need Visual Studio Code and the Azure Repos Extension and a recent version of Team explorer and/or Team Explorer Command Line Client.
To edit Azure Pipelines (available in Azure DevOps Server 2019), you'll need to also install this Azure Pipelines extension.
The naming is a bit confusing, but these Azure DevOps extension also work with recent version of Team Foundation Server and Azure DevOps Server (new name).
First you need to install the official Azure DevOps Extension for Visual Studio Code which released by Microsoft.
It supports both TFVC and GIT version control type.
Clone your Git repository
With Git, the extension uses the remote origin of your repository to
determine how to connect to Team Services (or your Team Foundation
Server), in most cases you will need to have a Git repository already
cloned locally. If you intend on cloning an existing repository, do so
before proceeding. If you do not have a Git repository cloned locally
but already have a Team Services account (or a Team Foundation Server
instance), you may create a local repository (via git init) and once
you set the "origin" remote for that local repository, the extension
will detect the change to the remote and attempt to contact the Team
Services account (or Team Foundation Server).
Create your TFVC workspace
With TFVC, the extension uses information about the current workspace
to determine how to connect to Team Services (or your Team Foundation
Server). Workspaces can be created using the Visual Studio IDE,
Eclipse or with the JetBrains IDEs (e.g, Android Studio, IntelliJ).
Note: At this time, you will need to have a local TFVC workspace already available on your local machine. More information about the
difference between the two types (and how to determine which one
you're using) can be found here.
You could also take a look at below videos to help get you started using the extension quickly:
Set up the Team Services extension for Visual Studio Code - If
you haven't used the extension before, this video will show you how
to set it up, create a personal access token and get up and running.
Walkthrough of the Team Services extension for Visual Studio
Code - This is a walkthrough of most of the features of the Team
Services extension.
TFVC Source Code Control for Visual Studio Code - This video shows
you how to set up the TFVC support on Windows and demonstrates much
of the functionality available for Team Foundation Version Control.
Above is for Windows machine, if you are working on Mac, please take a look at this answer.
Note:
VS Code will leverage your machine's Git installation, so you need to install Git first before you get these features. Make sure you install at least version 2.0.0.
You need Team Foundation Server 2015 Update 2 or later.

tfpt.exe on Visual Studio 2017

Even after installing Productivity Power Tools extension for Visual Studio 2017 I still cannot run tfpt.exe to execute the command suggested on this post:
C:\Development> tfpt unshelve "ShevesetName;UserName" /migrate /source:"$/Project/Source" /target:"$/Project/Target"
Where can I find this program?
The Productivity Power Tools are not the same thing as the TFS Power Tools, so that's why installing it didn't help.
There is no set of TFS 2017 Power Tools. From the TFS 2017 release notes:
Issue: No Power Tools have been released for TFS 2017.
Workaround: We are excited to let you know that most of the previous
Power Tools have been integrated into TFS 2017. The Process Template
Editor is one that has not been integrated, but we are going to
publish a Process Template Editor tool for TFS 2017 to the Visual
Studio Gallery shortly after TFS 2017 is available. We will provide
the link here as soon as it’s published
Just as Daniel said, they are two entirely different things. A supplement :TFS 2017 Process Template Editor is available
In your case, you are trying to use the unshelve command to unshelve a shelveset to another branch in TFS. As a workaround you could use tf Unshelve and Rename command to achieve this in two steps.
Or just install a earlier version VS and Power Tools such as VS2015 and Microsoft Visual Studio Team Foundation Server 2015 Power Tools. After all you just need to match the version of the TFS Power Tools with your Visual Studio client.
Possible workaround, which helped me!
Create a new workspace and do not download all the files.
Unshelve your changes to this new workspace, which would result in having only the modified files from your current branch.
Compare and manually merge your changes into the other branch.
You can use this VisualStudio extension witch does exacly what you want:
MultiMerge - https://marketplace.visualstudio.com/items?itemName=Jesusfan.MultiMerge2022
This extension allow you to unshelve to other branch.
You can use git-tfs to accomplish this. The steps you should perform are (after git and git-tfs have been installed):
create a git branch from the shelveset (git_branch_a).
initialize a git branch (git_branch_b) based on the TFS target branch (tfs_branch_b).
merge the git_branch_a into git_branch_b.
based on the git_branch_b create a shelveset.
the new shelveset can now be unshelved in the tfs_branch_b.

TFS Build Definition - Can you add this to source control?

I would like to add my Build Definitions to TFS Source Control. Is there anyway to do this?
Not really, no. If you're trying to track changes to your build definitions, you can use a couple of new commands in the latest releast of the Team Foundation Power Tools. The first compares two build definitions:
tfpt builddefinition /diff
This one exports a build definition's configuration to a text format, which you could then check into version control.
tfpt builddefinition /dump
Another option via powershell
https://gist.github.com/jstangroome/6747950
which basically uses c# types so should be easy enough to make into a linqpad or c# console app (or winforms or wpf)
used assemblies
Microsoft.TeamFoundation
Microsoft.TeamFoundation.Client
Microsoft.TeamFoundation.Build.Client
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Build.Workflow.dll

How to get tf.exe (TFS command line client)?

What's the minimum amount of software I need to install to get the 'tf.exe' program?
You need to install Team Explorer, it's best to install the version of Team Explorer that matches the version of TFS you are using e.g. if you're using TFS 2010 then install Team Explorer 2010.
2012 version http://www.microsoft.com/en-gb/download/details.aspx?id=30656
2013 version http://www.microsoft.com/en-us/download/details.aspx?id=40776
2019 version https://visualstudio.microsoft.com/downloads/#visual-studio-team-explorer-2019
You also might be interested in the TFS power tools. They add some extra command line features (using tfpt.exe) and also add some extra IDE features.
I'm in a virtual machine, and am trying to keep my VHD as small as possible, so I find Team Explorer is a really heavyweight solution (300+ MB install). As an alternative, I've had some luck copying a minimal set of EXEs/DLLs from a Team Explorer installation to a clean machine (.NET 4.0 is still required, of course).
I've only tried a handful of operations so far, but this set of files (about 8.5 MB) has been enough to get basic source-control functionality via tf.exe:
TF.exe
TF.exe.config
Microsoft.TeamFoundation.dll
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Common.Library.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
Microsoft.TeamFoundation.VersionControl.Controls.dll
(It should go without saying that this is a completely unsupported solution, and it doesn't free you from the normal TFS licensing requirements.)
Depending on the operations you perform, you may find that additional DLLs are required. Fortunately, tf.exe will produce a nice error message telling you exactly which ones are missing.
For Visual Studio 2017 & 2019, it can be found here :
-Replace {YEAR} by the appropriate year ("2017", "2019").
-Replace {EDITION} by the appropriate edition name ("Enterprise", "Professional", or "Community")
C:\Program Files (x86)\Microsoft Visual Studio\{YEAR}\{EDITION}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\tf.exe
For Visual Studio 2022, it can be found here :
C:\Program Files\Microsoft Visual Studio\2022\{EDITION}\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe
There is a Java TFS client in the Team Explorer Everywhere installation (together with an Eclipse plugin). Look at http://www.microsoft.com/en-us/download/details.aspx?id=30661
For reference: these are the required DLLs for Visual Studio 2017 (as did #ijprest for the VS 2010)
TF.exe
TF.exe.config
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Core.WebApi.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
Microsoft.TeamFoundation.VersionControl.Controls.dll
Microsoft.VisualStudio.Services.Client.Interactive.dll
Microsoft.VisualStudio.Services.Common.dll
Microsoft.VisualStudio.Services.WebApi.dll
They will be in my base VM image. I'm going to use it to pull the latest deployment scripts from VC to a temporary local workspace folder when installing a new server.
tf workspace /new ...
tf workfold /map ...
tf get "%WorkSpaceLocalFolder%" /recursive
tf workfold /unmap
tf workspace /delete
<run deployment scripts from "%WorkSpaceLocalFolder%" >
rmdir "%WorkSpaceLocalFolder%"
(Sorry to post this as an answer, but I don't have enough reputation to comment, which I believe it should have been)
The tf.exe command line is included in the VSTS agent package in folder externals\vstsom.
You can also try TFS CLI for Node.js which is a cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services.
Visual Studio 2017 Team Explorer
According to https://blogs.msdn.microsoft.com/bharry/2017/04/05/team-explorer-for-tfs-2017/ you can now download it separately from Visual Studio via this link:
https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=TeamExplorer&rel=15
Following on from the earlier answers above but based on a VS 2019 install ;
I needed to run "tf git permission" commands, and copied the following files from:
C:\Program Files (x86)\Microsoft Visual Studio\2019\TeamExplorer\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.Common.dll
Microsoft.TeamFoundation.Core.WebApi.dll
Microsoft.TeamFoundation.Diff.dll
Microsoft.TeamFoundation.Git.Client.dll
Microsoft.TeamFoundation.Git.Contracts.dll
Microsoft.TeamFoundation.Git.Controls.dll
Microsoft.TeamFoundation.Git.CoreServices.dll
Microsoft.TeamFoundation.Git.dll
Microsoft.TeamFoundation.Git.Graph.dll
Microsoft.TeamFoundation.Git.HostingProvider.AzureDevOps.dll
Microsoft.TeamFoundation.Git.HostingProvider.GitHub.dll
Microsoft.TeamFoundation.Git.HostingProvider.GitHub.imagemanifest
Microsoft.TeamFoundation.Git.Provider.dll
Microsoft.TeamFoundation.SourceControl.WebApi.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.VersionControl.Common.dll
Microsoft.TeamFoundation.VersionControl.Common.Integration.dll
Microsoft.TeamFoundation.VersionControl.Controls.dll
Microsoft.VisualStudio.Services.Client.Interactive.dll
Microsoft.VisualStudio.Services.Common.dll
Microsoft.VisualStudio.Services.WebApi.dll
TF.exe
TF.exe.config

Resources