VS 2015: How to "remember" TFS path? - visual-studio-2010

In VS 2010 the Source Control Explorer would simply remember your last TFS tree selection and jump the very same branch and sub-folder again.
VS 2015 always starts at the very root node and you have to annoyingly navigate to your work branch every time.
Is there a way to make it remember the path like 2010 did?

Forget it, I just should have a taken a proper look at the VS TFS settings in the options...
"Open Source Control Explorer to the most recent folder"

Related

Visual Studio: prevent collapsing folders in solution explorer when opened

Every time I open a project in Visual Studio 2022 all folders in the solution explorer tree are collapsing. This is very annoying and interrupts my workflow. I couldn't find any setting for this. Is there a way to prevent this behavior?
This also appears to happen in older versions of Visual Studio.
As #arkord commented on their own question, the auto-collapse is not coming from VS 2022, but rather from the CodeMaid extension. However they cited the incorrect settings.
In Visual Studio, from the menu bar, select "Extensions" - "CodeMaid" - "Options..."
Then select the "Collapsing" section
Uncheck both the options for:
Collapse solutions when they are opened
If there is only one project in a solution, keep it expanded but still collapse its children
Select the Save button
Now when opening your solutions in Visual Studio 2022, they should not auto-collapse, instead returning to where you last left off.

Customise Solution List in Team Explorer Home Page (Visual Studio 2015)

I am using TFS with Visual Studio 2015. On the Team Explorer Home window it lists solutions from my current workspace. This is a really handy place to open solutions from - however the solutions listed seem to be just a random selection from the workspace. It doesn't even list my recently opened solutions. Is there any way to customise this list?
Cannot be achieved.
However there is a workaround, after checking this option " Open Source Control Explorer to the most recent folder" in Tools→Options→ VSTFS, it will remember your last TFS tree selection and jump the very same branch and sub-folder again.

Visual Studio TFS workspace and solution explorer

I have a problem with my team foundation server whenever I change something in the project and then check it in other visual studio can't see the changes when they get latest version of the file or entire project but the change is available in the Source Control Explorer but not in the solution explorer.
I use Team Foundation Server 2013 and Visual Studio 2013 Ultimate.
If the file exists on disk (physically in the folder) but does not show in the solution then it is likely that the file was checked in, but the modification to the solution was not.
On the solution explorer there is a "show all files" button at the top of the page. If you click it you should see the file grayed out. Right click on it and add it to the solution with the "include in project". Now check in the change to the project file.
Everyone will now see it added.
You need to find who is adding files and not checking in the solution. I find a rolled up newspaper is most suitable to rectifying the issue permanently.

Source Control Explorer in Visual Studio 2013, keep last tree state open

I like some of the new things in Visual Studio 2013. Some stuff is annoying, but I guess they try to push or pull people toward different practices.
But what's weird is the source control explorer when I open VS2013 is completely collapsed. In VS2010 it was always open to the last state I had it in. This becomes more and more annoying as I use VS2013. I constantly have to click through. Sure I can open recent projects, but come on. How can I keep my tree open :)?
On the right is what it always opens to, in VS2010 the tree would look like on the left if that's how it was when I closed it.
Had the same problem.
Found this option in Tools -> Options -> Source Control -> Visual Studio Team Foundation Server: Open Source Control Explorer to the most recent folder

How to have TFS 2010 detect changes done to files outside of Visual Studio?

I'm using Team Foundation Server 2010 with Visual Studio 2010.
Whenever I modify a file outside of Visual Studio, TFS doesn't seem to detect the change done to the file, and thus doesn't offer me the option to check-in the file after it has been modified.
How can this be solved?
TFS has a "Reconcile" command for this:
Open the Source Control Explorer
Right-click on the folder with the changes and choose Compare
Select the files you want to reconcile (press CTRL+A to select all files)
Click on the Reconcile button
Set the options in the Reconcile Folder Differences dialog. Make sure Files that do not have pending changes is set to Check Out
Click OK
If you have local changes the Check Out dialog will be shown. Set the preferred Lock type
Click Check Out
See also: Reconcile differences between folders
If you have a network connection to your server while you're working outside of Visual Studio, it's probably best to go ahead and check the file out before editing it, either using the tf command line client, or using the Windows Explorer shell integration that's available in the TFS Power Tools release. (Plus an increasing number of other tools have TFS integration that makes this automatic, but if you're just using notepad, this still needs to be a manual step.)
Of course, there are many times when you're working and you don't have a network connection available that allows you to check out the files.
If you know what files you've modified, you can just check them out from within Visual Studio, then you'll be able to check them back in.
If you don't know what files you've edited, you can detect the changes by running the tfpt online command (also part of the Power Tools release). This will locate the files that have been modified locally and check these files out from the server.
This worked for me, using the TFS Power Tools:
tfpt online /adds /deletes /diff /noprompt /recursive directory-name
(where directory-name is the path to the directory to be updated, otherwise it will detect changes throughout your entire TFS repository)
If you want to know what it would do without it actually making any changes, you can force it to do a dry run by adding the /preview switch.
*1- make changes outside of Visual Studio
2- go to Visual Studio and open Source Control Explorer
3- right click on the folder > "Check Out for Edit" > "Check Out"
4- right click on the same folder > "Undo Pending Changes..." > "Undo changes" > "No to All"*
I tested this workaround on a branch and it helped me a lot. But there are only new files and new folder who has to be done manually.
I recommend to create a branch before the operation. It isolates you the time of the operation.
Note: This technique does also the files identical cleanup that TFS always marks as modified.
Try this. It's some sort of workaround, but it works:
make changes outside of Visual Studio
go to Visual Studio and open Source Control Explorer
right click on the folder > "Check Out for Edit" > "Check Out"
right click on the same folder > "Undo Pending Changes..." > "Undo changes" > "No to All"
That's it. The changes are visible now.
There's also another solution to get TFS to figure out the files that have changed outside of Visual Studio:
Open the solution offline
In Solution Explorer select the solution file and then press the Go Online button ()
TFS will automatically scan the solution for changes after this.
Step one can be achieved in a number of different ways. Here are some:
Use the GoOffline Extension - very simple and effective.
If you're asked for TFS credentials when opening the solution (no automatic domain auth), then don't enter the credentials. The solution will open offline and you'll login after pressing the Go Online button
(extreme solution) Disconnect your network cable; Open the solution; Connect the network cable.
Visual Sourcesafe works like this too and the way I get VSS or TFS to notice the change is by checking the file out once inside Visual Studio.
Open Source Control and go to your TFS folder. Right-click on the folder and choose 'Compare'.
Notice that your edited files show up marked in red.
I find this is better than tfpt online which also gets you files that are not readonly and not edited.
I had this problem in the past, when my Internet was down and I worked offline, and most of my changes didn't appears in Team Explorer.
Following these steps:
First, In the solution explorer, select the folder that you want to re-conciliate (for me, it was my entire solution folder), and select Compare...
Click in Modify Filter, and in the filter text-box, you could type:
*.cs;!obj\;!bin\;!packages\;
In this example, it will include in the search only C# files and exclude in the folders: bin, obj and packages.
Notice the column Pending Change has the info whether the file is marked as edit, add, etc... or nothing...
To mark as edit (when the local item has a matching server item), select the file and choose Check out for Edit...
To mark as add (when the local item doesn't have any server item), select the file and choose Add Files
Finally, I am not sure why the projects are not listed here (after I remove *.cs filter, still doesn't show up), so rebuild the solution to make sure the projects updates as well
+ In the solution, click the connect button (if shows up) that said Go Online.
I found that in Visual Studio 2015, with the project open, Visual Studio discovered for itself that files had been modified externally, and automatically checked them out without me having to do anything. Checking in the project in the normal way saved the external modifications.
In my case, the following worked (at least the one time I tried it):
Go to the Pending Changes panel
Select View Options under either Included or Excluded changes.
Switch between Show All and Show Solution Changes
Switch back if desired
Changing the View Option appears to force a refresh of modified files.

Resources