0
votes

I have an existing visual studio solution in a git repository that I have decided to migrate into Visual Studio Team Services. The git migration goes excellent, I can see my code in the portal and I seem to be able to do my basic git commands from within Visual Studio Team Explorer.

However, now as I have started to work with the continuous integration part of VSTS I realize that I am not actually connected to VSTS from my Visual Studio solution. As soon as I try to Manage Connection and then connects to my VSTS project my open solution closes itself. If I then tries to manually open my solution again I automatically lose the connection to VSTS.

I am assuming there is a connection I need to set somewhere, but I can't find where.

I have also tried to clone my repository again from the VSTS portal (Clone to Visual Studio). This just opens an instance of Visual Studio but will not clone any code.

2

2 Answers

0
votes

The simple way to push project/solution to other git repository in VSTS:

  1. Open your solution in VS
  2. Select Team Explorer (it is connected to original git repository)
  3. Click Settings=>Repository Settings
  4. Add another remote repository enter image description here
  5. Go to Team Explorer Home view=>Click Sync
  6. Click Push and select added remote repository and click Push enter image description here

If you want to connect to target repository directly to do work, you can connect to target git repository through VS (team explorer), then clone that repository to another path after pushing solution/project to target repository(previous steps), after that you can to do work with current solution/project.

0
votes

Ok, I have sort of solved the problem. It seems to have been a naming issue (I think).

I decided to remove my local repository and clone it again, but now using the VSTS link instead (but still outside Visual Studio). What I noticed was that the repository had a different name now (same as the project in VSTS) and all of a sudden everything just started working!