How to get changes from other users in VS Code from TFS - tfs

This question is for building Angular application in VS Code.
My team has been coding in VS2015 and using Microsoft TFS for version control (Please note that our code is within the company firewall, on a local TFS build server and not on Gits repository). For Angular, I installed VS Code and Azure Repos plugin for TFS.
Once Work-space is setup, I can see the files (I downloaded the files from VS2015 on local machine) but they all show as "Untracked" changes - why? These are checked in files.
Also, when a colleague checks-in files from their VS Code instance, my VS Code doesn't get it.
What is that I am missing here?

I figured out the issue (or a workaround). Posting my solution for any newbie facing the same issue:
Please note that my code is not in GITS or any remote repository, it is in Team Server hosted in the company data center.
I have a workspace created in VS2015 via which I mapped my Angular code and downloaded it on local machine.
VS Code Settings:
Make sure you have Azure Repos extension installed.
Go to File->Preferences->Settings (make sure User settings tab is selected)-> Extensions-> Azure Repos extension:
Provide the values for following fields:
(a) Tfvc: Location Example value for VS2015: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\tf.exe
(b) Tfvc: Proxy
Example (this should be your team server name): https://dataCenter.myCompany.com:9100/tfs
(c) Tfvc: Restrict Workspace (this is optional, use only if needed)
Check the box
Goto View->Command Palette-> type Team: Signin, provide username and password.
Goto File->Open folder-> select the folder mapped via VS2015.
Once the folder is open, you will see all files inside the folder. Go to File->Save Workspace As and give it a name.
Now you should be able to see any changes done by you in either VS2015 or VS code. Check-in should reflect the changes for you and other users connected to the code.
Previous Mistake: I realized that I was using Gits:Initialize Repository (as advised on various sites) which was causing all the trouble of "Untracked" changes and other users' changes not reflecting in my code.
Thanks,
RDV

Related

Adding project from VS2013 to AzureDevOps

Im using VS 2013 (CE).
Windows Server 2012 with a local install of Azure DevOps.
I can connect to the repository via the URL
http://example.local/DefaultCollection
Under defaultCollection i have another few test projects i.e.
/DefaultCollection/A-Project,
/DefaultCollection/B-Project.
For this example i will user C-Project which im trying to add to source control.
All im trying to do is add a project to this source control but i am experiencing issues that i would have thought shouldnt exist:
In VS2013, I add a new solution. I right click the project and select "Add solution to source control". Immediately it selects the project A-Project with the path /DefaultCollection/A-Project/C-Project. I dont want this as it resides inside another project.
From the web portal i create a new project and select Team Foundation Server (not Git as the examples online i have seen all select Git). In VS i create a brand new project and then attempt the same as 1 above but it tells me that i already have a project with this name under source control. I expand A-Project and i see it listed and undo any changes but it still doesnt add as i get some form of error.
Other problems range from the local version not mapped to, existing file exists/under source control to other errors.
What is the correct process to add a project to Azure Devops when using Visual Studio 2013 CE?
The default steps are described here: Set up Team Foundation Version Control on your dev machine.
You have to:
Create a workspace from the target project.
Copy your project into the locally mapped folder.
Add your project to the source control.
As workaround:
Create workspace from the target project: Create and work with workspaces
Copy your project into the locally mapped folder.
Add your project to the source control by: Manually add files to version control
Open the project and fix source control bindings:
Useful document: Add files to the server

Can not connect to tfvc with visual studio code

First of all, I am very new in the programming. I learnt a lot (thanks to my teacher :D) and now I and my 2 friends has a common project. We thought that we could build a webpages with .ASP, jQuery, C#, sql. I am the front-end guy therefore I use Visual Studio Code. We have a common vsts. I downloaded the latest version of visual studio code and the latest version of team services extension, red a lot of documentation that explains how I need to do this. I got this error message:
(team) No Team Services or Team Foundation Server repository configuration was found. Ensure you've opened a folder that contains a repository.
Please someone explain me how can I connect. I would appreciate it, if you make a short and fast tutorial video. I can do almost everything from documentations or tutorials, but now, I really don't know where I am.
Thanks your help in advance! <3
First you should use the official Visual Studio Team Services 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.

What is the path when using Team Foundation Version Control (TFVC) as the VCS for a Jenkins project?

I'm trying to connect a Jenkins project to a Visual Studio Team Services repository.
If I use the "Git" option for the VCS in the configurations (as I've seen in most tutorials), I get authentication issues, and entering my credentials does not remedy the error. If I use the "Team Foundation Version Control" option, it accepts the repository URL without any errors, but it asks me for the "project path."
So, my question is actually twofold:
(1) Since Team Foundation is now known as Visual Studio Team Services, is this option depreciated and thus not worth using in my configuration anyway? I haven't even seen it or heard it mentioned as an option in any tutorial I've gone through, so I'm not sure if it's even used anymore (I thought my version of Jenkins was current, but I guess it might not be, somehow.) If this option is outdated, what is the preferred method now?
(2) What is the "project path" that it is asking for? It says it must start with $/, so I'm not sure if that means it's the path to the project in the file system of the environment it's going to be running in (in my case, on a slave machine), or if it's referring to its path in the Visual Studio Team Services system or what exactly.
I've attached a screenshot below for reference. Any and all advice will be appreciated.
Jenkins VCS config screenshot
Regarding git authentication issue, you can use Personal Access Token (username can be anything, such as test) or Alternate Authentication Credentials. The same as TFVC.
Regarding the path, it is the server path of TFVC
Go to Code page of team project
Select Files tab
Select a folder
Get the path

Ceate repository for android on tfs

I want to upload android source code on TFS using visual studio and my server side is written using C#
how to create repository for android on TFS
UPDATE1:
Please read Get Started documents first:
Get Started with Git and Team Services
Get Started with TFVC
UPDATE2:
If you just want to isolate the documents from the source code, you can create a new folder under the project, or create a new branch to store the documents, of cause you can create another repository, it's based on your requirements. Please see this article for details.
Do you have any special requirements? If not, nothing different with other projects. Assuming you are using TFVC, just try following below steps:
Connect from Visual Studio or Team Explorer
Create a team project
Add repositories
Configure your workspace and check in the source files/changes.
You can create the repository individually for client and server projects as needed.
If you just want to upload the existing source code to TFS, you just need to Put an existing solution under version control
Please see the overview documents for more information.
If you are using Android Studio, you can install the Team Services Plugin for Android Studio with Git repositories used. See here fro more info.

team foundation server (TFS) in the cloud not able to delete / adjust mapping

I tried out the TFS Service with a project of mine. After I experienced some problems (probably misuse) I used VSUnbindSourceControl.exe (see: http://vsunbindsourcecc.codeplex.com/) to detach the project (locally) from the TFS, but it looks as if on the server side, the project that was uploaded, is still bound to my computer.
See image:
and the error message in the output window:
Failed To Create Mapping
The working folder G:\Quant tool DotNet4 is already in use by the workspace USER-PC;myemail# somedomain dot com on computer USER-PC.
(I now use a different email address than the one above)
I've tried to delete the project from the server via the Source Control Explorer in VS, but the delete option is disabled. (also when I login with mldz at hotmail dot com.
I was also not able to delete the project or change it's settings via the TFS web interface.
Anyone experience with this problem and how to solve it with the new TFS in the cloud? i saw some similar problems with a normal TFS and some solutions could be done via the the team foundation administration tool, but that cannot be applied to the TFS in the cloud (AFAIK)
Some info about trying to install TFS integration tool
Hi,
I use VS2012 express and although I installed vs_teamexplorer.exe,
I'm not able to install Microsoft Team Foundation Server Integration Tool.
Already restarted the computer after installation and tried again. Doesn't work. Missing something?
regards,
Matthijs
You can use the same admin tools for tfs.visualstudio. See examples. At end of http://msdn.microsoft.com/en-us/magazine/jj130558.aspx article which show deletion of workspaces, for example.

Resources