Solution Explorer not showing files after Get Latest - visual-studio-2010

I am working with another dev and we're using TFS for source control. When he checks in a file or folder, I can see them with Source Control Explorer. I can do a Get Latest, and I can see that the file or folder is pulled down to my local file system.
However, if I flip over to my Solution Explorer, his new files or folders aren't appearing. I have clicked refresh, I have done a Get Latest from Solution Explorer, I have done a Get Specific Version from Solution Explorer.
Is there something I'm supposed to do to have them show up? Do I need to do an Add Existing Item every time he adds something to source control?
Thanks,
Chris

Adding files to source control is not the same thing with adding files to a project.
You are supposed to see the files on source control also.
To be able to see the files on solution explorer you need to add files to existing project by "Add Existing Item" option.

Related

TFS not adding files to repository properly

We are working with building ETL packages in SSIS using a TFS repository. When my collegue add new files to the repository they are not added properly to the repository even though he checks in the entire project file. He sees the files in his project folder, and it looks like everything is checked in. But when I click on "Get latest version" I get a warning that the package is missing from the project directory. If any of us then try to add the file again we get a warning that the file all redy exists, even though it is not visible in my folders. Right now the solution we are using is for him to delete the file and then commit the change. After he deletes the file I get the latest version. Then he sends me the files and then I add them to the repository. Once I have added the files things seem to work as expected. Has anyone else had this problem, and know of a solution?
UPDATE:
The solution we found now is that I have to go to the local folder and find the new file my colegue added. Then I right click the file he just added and select add to project. Then the new file is visible in my version, but it does not have a blue lock icon next to it. If I then double click the sln-file to reload the project the blue lock icon is visible to me.
It is still not an optimal solution, but it works a lot better than him having to send me the file so I could check it in.
Is this the way TFS is supposed to work?
Can you please check the mapped work space path in your local machine there you will find the checked code. You need to manually Add.
Right Click on SSIS package -->AddExisting Package--> Select the package from Workspace-->Ok
Now you will find the missing package in your Solution Explorer as well.
If you are using TFVC.
Open Source Control Explorer=>Right click that solution/project folder=>View History, then check the related ChangeSet whether he add the file correctly.
Let your college to check the permission of that folder/file: Right click the folder/file->Advanced=>Security.
Regards

TFS source control - new files not automatically detected as pending changes

As per the tags, I'm using VS2013 and TFS2013.
There are multiple projects in the solution: Model, Presenter, View, etc. All other projects are working as expected in terms of source control operations.
Problems with the Model project:
Adding a new file via Solution Explorer isn't automatically detected as a pending change
Deleting a file isn't detected either
Other source control operations work fine for the Model project, such as:
Get latest version
Edit detection for existing files (including changes to the csproj
file when a new file is added)
Checking in pending changes
The csproj file would show up in pending changes with the newly added file listed in it, but the new file itself isn't showing up, therefore causing build errors on other developers' machines if only the csproj changes are checked in.
The workaround is to find the added file in solution explorer and Add via context menu, this will make it appear as a pending change. But this process should be automatic as per the other projects.
Noticed that there is no .vspscc file for the Model project while other projects have one each.
Any help appreciated. Thanks.
I would unbind and rebind the problem project and try again:
To unbind a solution or project from source control
In Visual Studio, open Solution Explorer and select a solution or
project to unbind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Unbind.
To bind a solution or project to source control
In Visual Studio, open Solution Explorer and select a solution or project to bind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Bind.
Select the database and location to which to bind, and click OK.
Click OK.
You might need to go to Advanced to find the Change Source Control option
https://msdn.microsoft.com/en-us/library/0eh3790h%28v=vs.90%29.aspx
Before unbinding and binding your solution try his:
Go to Source Control Explorer
Click the "Add Items to Folder" (the
one on the left of the red cross)
Select the items you want to Add and follow the instructions on screen
That's all
Click <Detected: x add(s), x delete(s)> : in the source control explorer then select the file to add
For years I've been relying on 'Detected Adds' to add missing files - which was never a sustainable solution but I've just about managed with it.
But now if broke.
I'm actually about to reinstall Windows but in the meantime one of the best ways I've found to get a sense on what's missing (and it's still working even though the detected adds isn't) is the recursive 'Compare' window.
You can add files from here too.
It's a little klunky but it gives me a good sense of security and shows file diffs if you want to see what may have changes.

vs 2013: Source Control List location

I'm not sure if this is the right place for this question, so forgive me if it is not.
Our group uses Accurev (AccurBridge) for our source control.
I wanted to know where the vs 2013 source control list is read from? VS is not detection all my source control options all the time, so I would like to make sure that this folder is always in the list.
Thanks,
I recommend you'll install TFS source control explorer extension:
https://visualstudiogallery.msdn.microsoft.com/af70cbb7-1e0d-4d16-bc57-cccc15370c51
Which includes the following features:
Move to Folder
Branch to Folder
Merge from Sources File icon change
Drag & Drop
Show / hide deleted items
Destroy
Source Control changes and fixes
Update Since you added you are using Accurev - go to AccuRev menu and choose Workspace Information.
There you'll see the attribute "Accurev_BIN" which display the folder where AccuRev read its source controlled files.
I hope that support your question.

How do I get Visual Studio Team Foundation Server to see I moved code to a different folder?

I moved some code from my c drive to my d drive. When I opened the solution, it told me that:
The solution appears to be under source control, but its binding
information cannot be found. Because it is not possible to recover
this missing information automatically, the projects whose bindings
are missing will be treated as not under source control.
So I tried permanently removing the bindings and downloaded the latest version. Now my changes don't register as pending changes.
I've tried selecting the solution in the Solution Explorer and File => Source Control => Change Source control, but it does not let me bind. Server Name and Server Binding columns have "".
Generally speaking, the location of code on your machine is dependent upon where your workspace is located.
If you move your workspace to the D: drive, then there shouldn't be an issue.
However, if you simply used Explorer to copy the files to the new location, then VS isn't going to be able to maintain the bindings.
From the Workspace Editor you can map the entire tree, solutions or even individual projects to a new location.
First off, put it back and undo the changes.
Then, Go to File | Source Control | Workspaces.
Click on the work space name and then the "Edit..." button.
In the working folders area select the source control folder you want to move and give it a new local folder location.
You will need to edit your Workspaces for TFS Server to know the change that has happened at your local machine. To edit your workspace, in Visual Studio:
ensure you have no pending changes; also copy your source code folder to some location temporarily, just to be safe (you can remove after you are all set)
go to Source Control Explorer
locate the "Workspace:" dropdown
select the item "Workspaces" from the dropdown list (you will get a dialog titled "Manage Workspaces"
if you have multiple Workspaces, select the appropriate one from the list in the dialog
click on "Edit" button (you will get an "Edit Workspace..." dialog)
down below in the dialog, you will see "Working folders" grid
click on appropriate row from the grid and modify the "Local folder" path to set to your new folder location
Sometimes TFS and Visual Studio have issues in getting these workspace changes synchronized. I would always close Visual Studio and re-launch it to get my changes synchronized anytime after I make Workspace related changes.
Hope this helps.
the most crude way here (I don't know if there is any other way)
is to put the folder back to its old location , Check in your changes
then remap the project to the new folder
When you move files/folders to make the moves pending changes you need to use a TFS client to do the moves.
For one or two files the Team Explorer UI is OK, for more the command line is easiest.
See tf.exe rename on MSDN (tf move is an alias for rename). There is also step by step help on using the GUI: Move, Rename, and Delete Version-Controlled Files and Folders.

TFS files not added to solution but can be seen in source control

My partner and I are working on a project using TFS. For some reason when he adds files to the project then checks them in, I don't get them when doing an get latest version. The same thing happens when I check in files, he doesn't see them. We can both go in to source control and see the files are there, and even get latest version, but they are never added to the solution explorer. Any ideas what is happening?
If he, or you, has checked in the files, but not checked in the project file, then TFS will not download them if you execute a "get latest" by right clicking on the project or solution in Solution Explorer.
You WILL however get the files downloaded correctly if you right click and "get latest" on the folder in the source control window, however, they won't get loaded into your solution, because you haven't told TFS that they belong there.
Can you verify that the .csproj (or .vbproj, etc. depending on language) has been updated to actually include the new file(s)? Is the project file also being committed along with the new files?

Resources