Visual Studio 2017 has been the crappiest so far. I have an existing solution that I want to add to source control (VisualStudioOnline.com) but every time I do it simply creates a GIT repository locally and I DO NOT want GIT. It does not even ask.
I changed the options to default to VisualStudioOnline. But when I try to add the solution I select Manage Connections, then I see the project repository I created on VSO website and click on it then Connect. After a while the window simply disappears giving no error and the Team Explorer still says I am Offline, so it was not added to TFS. My VS.2017 however is connected to my VSO account.
What is the problem here? can't they even give a hint as to why it is not connecting?
So you want to add project to TFVC VCS not git in VSTS (visual studio team services). First you should create a TFVC repo on VSTS, then connect with VS2017, finally add the existing project in source control and check in. Detail steps as below:
Create a TFVC repo by creating a new project or adding a new repo for existing project in VSTS.
Connect with VS2017.
VS -> Team explorer -> Manage connections -> connect to project -> make sure your email for VSTS acount is selected -> select your new created TFVC repo -> connect -> Map & Get.
Add the existing project to source control.
Copy the project file to the subfolder that you just mapped -> Team explorer -> source control explorer -> select the folder with the TFVC repo you created -> click Add Items to Folder -> select the project -> Finish.
Check in changes to VSTS.
Now the project is added in source control, you can click pending changes to check in the project to VSTS.
Yes, it is not intuitive and I hate it too. These are the most "automated" steps:
Open the solution you want to add to VSTS.
Go to Team->Manage connections...
You will see all your VSTS connections, I happen to use two VSTS, one from visualstudio.com and one on-premises. Choose the connection you want and right-click then select connect.
Once connected, select File->Source Control->Add solution to source control...
It will show up the VSTS dialog and let you choose a folder for your solution.
Done.
Cheers,
MarianoC
Related
I'm using Team Foundation Server 2015 14.102.25423.0 and until now all of the team's developers have configured their workspaces to be server.
Now because of a policy change, we want to make all workspaces local.
Of course, one option is to go to each developer and make that change inside Visual Studio.
But I wonder if there is a way to force it from the server?
We create and work with workspaces using visual studio to connect Azure DevOps Server as this doc stated.
Thus I am afraid that the only option is to go to each developer and make that change inside Visual Studio if you want to change workspace from server to local. You need to go to File -> Source Control -> Workspaces (File -> Source Control -> Advanced -> Workspaces for VS2017), then select your workspace (it should match your computer name) and click Edit, then Advanced. There you can switch between Local and Server workspace location. See this thread for more details.
In addition, if you are an administrator, you can specify which type of workspace Visual Studio creates for your team members by default: Local or Server.
On the menu bar, choose Team, Project Collection Settings, Source Control.
The Source Control Settings dialog box appears.
On the Workspace Settings tab, choose either the Local or Server option button.
See: Decide between using a local or a server workspace for more details.
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.
Using TFS everywhere. Editing files without "checkout for edit".
after it, unable to see edited files list in "TFVC pending changes" window.
Try to see if your project is Offline, that is the behavior when your project is not connected with the TFS.
1- Right-click on the solution name right at the top of the Solution Explorer and select the Go Online option
2- If that doens't help, please check your connections to the tfs through the Team Menu -> Manage Connections.
3- If still happens, try to restart the Visual Studio
You are using Team explorer everywhere. Try to check whether your project is offline:
Right click your project > Team > Return Online.
BTW, the project will be offline if you switch workspace to other that isn’t include that project.
Update:
Pending changes window > Click Actions > Detect Local Changes, then the modified file (tracked by source control) in current workspace will be included in Included Changes
I'm using Visual Studio 2015 and have deleted a branch from our TFS source control. Looking at other guides there's mention of being able to recover the branch by opening Source Control Explorer, right-click and select 'Undelete' or 'Rollback'. These options are not available
I have not got this branch mapped on any workspace. Clicking on 'Undo Pending Changes...' brings up a message saying there are no pending changes. How can I restore a branch on TFS? Is there a way I can enable Undelete or Rollback?
First, please make sure you or your teammates haven't destroyed this branch (After doing this, there is no way to recover it in TFS server).
If you delete this branch in Visual Studio,
To restore an item deleted from the server
From the menu bar choose Tools, Options.
On the Options dialog box, navigate to Source Control, Visual
Studio Team Foundation Server.
Select Show deleted items in the Source Control Explorer, and then
choose OK.
From the menu bar choose View, Other Windows, Source Control
Explorer.
In Source Control Explorer, navigate to the folder that contains the
item you want to restore.
Open the item’s context menu (select the item and right-click it) and
then choose Undelete.
If you delete this branch from your dev machine outside of Visual Studio,
Please check the solution from MSDN link Delete or restore files and folders
Morever, you can also try to use the undelete command restores items that were previously deleted. For Example:
tf undelete [/noget] [/lock:(none|checkin|checkout)]
[/recursive] itemspec[;deletionID] [/login:username,[password]]
Update:
Note: To be able to undelete a branch you must first map the parent folder/branch to your workspace. Now, the undelete option will be enable.
According to the screenshot, there is no workspace configured for it. Try configuring a work space for the project that include the deleted branch to see if the "Undelete" option will be activated.
In Visual Studio go to [Tools->Options] then Select [Source Control->visual Studio Team Founation Server] and check the [Show deleted items in the Source Control explorer].
After that, you can then right click a folder and say "Undelete"
I'm able to view the project
1.from the Source Control Explorer but not in Team explorer,Only if i have open the local project which is binded to TFS Only then i can view the other folders within in TFS Project.
2.From Tfs command Line Utility
3.Suppose there are no workspaces and no projects downloaded from TFS then only way to view the project is from the command line Utility.
Is there any way fix this issue.
Right click on the root in the team explorer pane, and select "Add existing team project". You should be able to select the new project from there.
It sounds like a permissions issue. I'm guessing you don't have permissions set up on the Team Project, but you do have read permissions on the source control. Keep in mind that, though the two are related, they are stored and maintained separately in the back-end.