Checking in uninded code to tfs - tfs

I was working on a project in visual studio 2015
Forgot to checkin the code
We installed a new tfs site
Now when I open the code from my hard drive I get the message that the tfs server cannot be found.
My issue is, when I use manage connections to connect to the project, the solution gets closed. When I reopen the solution from the hard drive, the connection to tfs is lost. Is there a sequence I need to follow to get this right?

Connect to new TFS in VS
Open Source Control Explorer and map
the TFS folder to your existing local folder
Check out for edit
on changed files
Check in files
Everything should be working

It seems the project is source controlled by the previous TFS. Try to open the project, go to File--Source Control--Advanced--Change Source Control, and Unbind the solution and projects.

Related

TFS not tracking changes if items added manually and not included into vs2015 solution

I've added a folder with asp.net core project which isn't supported by Visual Studio 2015 (which is used for everything else) and thus not included to the general solution.
To have those files in source control I had to manually add them using "add items to folder" command in source explorer. So they are checked-in but tfs not tracking changes for them anymore although there are differences that are shown if compare to the latest folder on the server:
How do I make TFS track them and show pending changes for edited files?
According to your description, looks like these files are all out side of Visual Studio.
Not sure if you are using server workspace or local workspace.
When adding or editing the workspace you click Advanced >> . There is a setting of Location: Local/Server.
For local workspace, when your script or anything else changes files outside Visual Studio, your workspace detects the changes automatically.
It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under Excluded Changes.
For server workspace, you could choose to use Reconcile command. See https://stackoverflow.com/a/22860674/932282 for a complete answer.
Besides, you could also take a look at other solutions in below similar question:
How to have TFS 2010 detect changes done to files outside of Visual Studio?
Force TFS to detect changes
I think you just added them to source explorer and not to the solution, as you said. In this case, there is no editor application (even your VS) that is responsible for doing the check-out operation because they are not aware of TFS. On the other side, TFS can detect that changes have happened to the files but can not track them.
If you do not activate the "Get the latest version before check-out" option in your team project, then you can go to the source control and check-out those files manually and then check-in them manually again when your work with them is done.
Please before doing this, take a backup of your source code for caution.

TFS Online Deleted Projects Cannot Be Remove from Visual Studio Source Control Explorer

Someone in my team has decided to delete old (unused) projects from our TFS Online server and now I see a bunch of GUID text in the Source Control Explorer in Visual Studio 2015.
On the right pane you can see that the projects do not exists on the TFS Online Server. Also, I logged in to our Visual Studio Online to make sure that its not there and its not.
I tried deleting the mapping and disconnecting from the server but when I connected back the GUID projects still there.
Also, I tried deleting the cache folder from "C:\Users\user_name\AppData\Local\Microsoft\Team Foundation\6.0" nothing helps.
The Guid in the middle (in the screenshot) seems to be mapped to a project that does not exists in my local anymore and I cannot remove the mapping.
Does anyone know how to delete these projects from my source control explorer?
by the way other developers see these GUID text too. Every developer sees it.
This issue is already reported here
Currently Azure DevOps Team is working on this issue for the fix.As of now there is no workaround for this. So, we have to wait for it.

Mirror FTP changes to local code with VS-2015

I've managed to edit sites through ftp connection in Visual Studio 2015 Professional version. How would I go about having those saved changes I make in the ftp Connection be mirrored in my local file system in a version control type of way?
(I've tried opening the site and then right clicking to select team foundation version control, this does not work)
If the files that you want to version-controlled have been added into TFS, you just need to create a workspace and map it with TFS. Then you can get all files from TFS.

tfs, the real location of team project

I have a project on server call "MyApp". I connect the tfs server, retrieve and save project my desktop.
Then change project name "MyApp" to "MyAppTemp" on server..
Call project again from server, i expect a problem but no problem. So I understood that the project also has got a different location on the server.
Where is real location of my team project?
This is a bit confusing, because you cannot locally save a team project.
A team project is a set of settings and options, which you can only see from the connected server, but not 'download' in any way. Maybe you're confusing this with Visual Studio projects, which is something totally different?
Anyway, data for a team project live in the TFS database.
Thomas
A workspace in TFS contains the mappings between a location in TFS Source Control and your local file system. http://msdn.microsoft.com/en-us/library/ms181383(v=VS.100).aspx

Getting "Failed to create mapping" when adding a solution to TFS source control

I've created a new Team Project in TFS, but when I try to add my solution to it I get:
'Failed to create mapping
Cannot map server path, $/Finance/MyApp, because it is not rooted beneath a team project.'
I can't find anything on google or here that looks remotely like this problem.
I had this issue when using Microsoft's Team Foundation Service from Visual Studio 2012. I had just created the new team project via the TFS website. Although I could see my new project in the 'add solution' window, I got the error the OP reported.
I had to go into the "Team Explorer" window, then into "Connect to Team Projects" and tick the new project. Then I was able to add my solution to the team project.
Is Finance a team project for you?
If not, you can clear the mappings for the workspace or even just delete your workspace.
http://msdn.microsoft.com/en-us/library/54dkh0y3(v=VS.100).aspx
Had the same issue when upgrading project to TFS 2010 from 2008. The solution was to delete the vsssc file in the root of the project folder and re-add it
In my case I had to do Team Explorer and connect to the new project
then I had to close my solution and re-open and then the "add to source control" worked.
--Connect and check project in team explorer window
--Close solution
--Open solution
--retry adding solution to source control
I had this issue with Visual Studio Online's source control, Visual Studio would not recognize the team project even after connecting to team projects, refreshing, restarting Visual Studio. I had to use the "Open in Visual Studio" link from the project on the Visual Studio Online site and then open the solution from there.
Well, i didn't want to do anything so drastic, it turned out that one of my subfolders inside the solution i wanted to add to source control, was mapped inside a different workspace (on a different TFS server). So the solution was to connect to that other TFS server, find and delete the conflicting folder mapping inside that workspace, and try again.
I had the same problem using visual studio 2008 and TFS 2012. In my case, when I manually added the local folder to the project through the workspace mapping, the problem went away.
File -> Source Control -> WorkSpaces -> Edit
Then when I went to add the solution to source control it detected the mapping automatically.
In my case, I copied the folder from "My Documents" to c:\tfsroot where I had mapped the TFS Root. Then when I opened the solution and added it to TFS it worked.
I had the same problem. My solution in VS2017:
Open Team Explorer tab
Select Source Control Explorer
Right click on the top level folder for the project and select "Advanced/Remove Mapping"
Remove the Mapping
Right click on the top level folder for the project and select "Advanced/Map to Local Folder"
Browse to the top level folder with the source code (You may need to adjust the path you selected. It may append a folder name to the end)
Click "Map"
Answer "Yes" to Message Box "Newly mapped items will not be downloaded until you execute a get. Do you want to get $/YourFolderName now?"
That should do it!

Resources