How to Clone Project on Azure DevOps? - visual-studio

I am using Team Foundation Services which is free in Microsoft: visualstudio.com
Is there a way to clone a project? I am checking online and it seems I cannot find any valid resources on how to do it. If I will do it manually, I will have to duplicate my project on my local and re-upload it again to my online TFS which if there is a way to do it online instead?

Map a workspace in the folder containing the code you want to check-in, then check it in.

Related

How do I add a project to a team project?

Some time ago I went to Azure DevOps Services, to create a new Team Project. The name of this Team Project is “Small Apps”.
When I created Small Apps, I created it using Git and Scrum, but didn't add any project a part of the Small Apps team project. Today I had an idea that I wanted to test out. So, I fired up VS 2017 and tried to connect to Small Apps in my Azure DevOps. Nothing doing. Couldn’t find it from VS 2017. I could find other team projects I’ve created in Azure DevOps (formerly VSTS) using either TFVC or Git, but I couldn’t find Small Apps.
Why is that?
Where in Visual Studio are you looking for your project? If you created a project but the repo hasn't been created (or cloned in Visual Studio) yet, you won't find it in Visual Studio.
Please (create and) clone the Git repo first, then you will find it on your machine.

Visual Studio Team Services opens an empty/unupdated solution?

We're trying to work together on our project, using VS Team Services. The problem is when we're opening the project from within its' VSTS website - what we see is the project empty and not updated with any recent changes.
The project's repo is on my PC, so I'm able to open it not from its' website.
'Sync' was being used.
edit: It seems that whenever I commit changes the VSTS saves our project to its' VS-site. why is that necessary?
You should add the source files to source control first. Then you could use Push with Git (or Check-in for TFVC) effectively. In your case, you should use the "Add to Source Control" option on the Solution itself to add all the appropriate files to source control.
Note that VSTS host two different source control technologies: Git and TFVC.
I would advice you to understand which technology you are currently using by reading this detailed article, then you will be able to add the source and work with team on the same repository.

Is there any method to perform check-in and check-out operations of TFS code repository from Jenkins build?

My ultimate goal of this exercise is to update TFS code repository from the contents (i.e., files and folders) which are getting copied from another source.
Following is the exact scenario in my project:
There exists a code repository in VSTS Online
Have setup Jenkins on my local computer.
Configured Jenkins to create a workspace for TFS code.
Written powershell scripts in the build step to copy files from another source to the workspace folder configured for TFS.
Till this point everything is working fine. In the next step, I want to update TFS repository from whatever is there in the workspace.
Any idea of how I can achieve this?
Thanks,
Nirman
You can try to use tf command with a script during the build just like Stefan suggested.
If you want to use Windows Explorer to manage TFS version control files, you can also try to use Microsoft Visual Studio Team Foundation Server 2015 Power Tools. Which allow you to check-in and check-out through folders.
You need to: First, create a workspace folder, put your project in this folder.
Then use Windows Shell Extensions coming with TFSPowerTools2015 to check in/check out files in the local workspace folder.

Automatically place drop in source control folder - VSO Build

I am building my solution in Visual Studio Online Build, the default 'steps' are build/test/index+publish/publish build artifacts. I want the build to be placed in a folder in my source control (rootfolder/builds). However, I don't see an option to enter an output-path anywhere.
EDIT: I see that next to 'timeline' on the build screen there is the option to view the 'Artifacts', but, I want to see/copy the drop to my TFS online project folder like '$myproject/mybranch/builds/'
The option to store the build drop on the TFS server is no longer supported. It was introduced as a temporary measure in 2012 and replaced with server drops in 2013.
Server drops are stored in an unversioned store in TFS/VSO and does not incur the overhead of versioning.
In TFS 2015 this transitioned to the new Artifacts repository. All build output is stored on the server and is accessible in the web, and through an API.
The way things stand right now, this is not possible. You have two options to drop your build outputs
Team Foundation Server
UNC file share if you use a on-prem agent.
See the Artifact Type argument on Publish build artifacts.
I it is possible with a custom powershell task. I have recently created a powershell build task that could "check-in" your drop artifacts into a folder like $myproject/mybranch/builds.
Have a look : https://github.com/skuvnar/visual-studio-team-services-scripts.
Although its possible, I would suggest against it - could lead to all sorts of trouble with the builds.

Clone code from TFS to Github

Hello I have project which I manage with visual Studio Online and tfs basic online.
But I need to share the code with coworkers who don't want to create MS accounts so they don't have access to the vs online code repository.
Can you tell me if there is any easy way to clone code from one repository to the other?
I'll be gratefull if anyone suggest me tools I should download to clone my code.
You can use GitExtensions, for example, to do this.
Clone Repository from TFS Server (the url is in the Code-Explorer of the TFS Website)
Set the Origin Remote (Remotes/Manage Remote Repositories, there you can set the path of the github Remote (is written somewhere on the website))
Push (for example via GitExstensions)

Resources