Adding project from VS2013 to AzureDevOps - tfs

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

Related

How to get changes from other users in VS Code from 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

Can I check in code to another project in TFS 2013?

I'm writing code in a TFS 2013 Project. I'd like to check it into a different Project on the same server. Can I do this? Thanks
You can not directly check in the code to another project, you need to add the code file to another project first for source control, then check in the code changes.
In visual studio Team Explorer:
Connect To TFS project 1, configure the workspace and map source
code to local folder1. Open the folder1 in windows explorer.
Connect To project 2, configure the workspace and map source code to
local folder2. Open the folder2 in windows explorer.
Copy the code file which you want to check into another project (eg,
project 2 here ) from folder1 to folder2, then the system
will detected the new added files under Pending Changes >
Excluded changes.
Click the Detected link to Promote the new added files.
Check in the files to Project 2
Refer to these articles for more information : Add files to the server
and Check in your work to the team's codebase
UPDATE:
You can link to the WI in the same collection, but cannot link to the WI which in another collection.
That means, if the team projects are in the same collection, then you can link the WI (associate with the changeset) which belongs to another project directly.

Add solution to different TFS team project

I've accidentally added my solution to wrong Team project on TFS, I've gone to File/Source Control/Advanced/Change source control, I've selected all my projects and unbinded them, went to solution, and after right click I've chosen Add Solution To Source Control, but pop-up appeared saying:
The item 'ProjectName.sln' is already under source control at the selected location.
If you are trying to rebind a project that you have already added to source control
outside Microsoft Visual Studio, you should use the Change Source Control command. If you are
adding this project for the first time, you should either choose a different server folder for the project or move the
existing project to a different server folder.
I've tried to bind project to new Team project, but when I tried to check in, not whole project was checked but only changes added since I've accidentally added it to wrong Team project.
To sum up how can now I add my project to TFS source control ?
You need to unbind it, then manually move the files into a local folder that is mapped to the correct team project. Then try doing the Add Solution to Source Control.
Each team project will be mapped to a different folder in your local workspace. If your files are under the folder for project A (which I assume they are if you've already added it to that team project), then you need to move them to a folder under Project B before trying to bind to Project B.

New files created by other users not showing in TFS using codeplex

I created a ASP.Net project in codeplex, and shared it with my other team mates. We are using TFS in VS 2010 as source control. The problem is if any user creates a new file in his workspace and "checks in" using TFS. The other users are not able to see this new file in their workspaces (even after doing "get latest version").
Is this a bug or am I missing anything here.
Note: The new file checked in is visible in the codeplex website under source code tab of the project.
Normally you should see these new files in the Source Control. To download these changes, your workspace should map folders with changed files. If you add some files into your project, you should also check-in your project file changes.
Or if you add some files into your existing TFS project and you forget to add new files into the TFS, your new files will be missing in Source Control.

TFS 2010 Missing Process Templates

I am trying to set up continuous integration using Visual studio 2010 and TFS 2010 and when i try to Create a new build definition, and go to Process Tab, i dont see any templates under the Build Process file(Windows workflow XAML) drop-down.
I have setup a build controller that points to our Team project collection and a build agent, in our TFS server.I am trying to setup a new build definition from my local machine Visual studio and i cant see any default templates under the Build Process file(Windows workflow XAML) drop-down.
Is there any settings i am missing ?Please let me know. Do i also need to install Visual studio in the TFS Server ?
All i need is whenever someone checks in a file, it should kick off a build and see the status if the build is broken or not !
Make sure you have a folder inside your Team Project Source Control called:
BuildProcessTemplates
Inside of there should be the following files:
DefaultTemplate.xaml
UpgradeTemplate.xaml
There are additional ones in this example, but you should have those two from the install.
If you have this folder and still cannot see anything in that dropdown let me know and we can take it from there. What most likely happened is you or someone on your team saw the folder and deleted it or moved it thinking it its placement wasn't important in the project. Or perhaps deleted the xaml files inside there.
The process section uses that folder and all files within it to display on that prompt.

Resources