Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Solution explorer vs using Source control explorer when working with TFS

Trying to use TFS 2010, I got confused with what option to use when working with local copies of files in Visual Studio 2010: Solution explorer or Source control explorer.

The Solution explorer is a more natural way of doing this (at least for starters like me) but using Source control explorer seems to be more convenient and productive. There are more options available, but clicking a file you still opens the local copy of it.

What are advantages of using one approach over the other?
Should I still go File => Open => Project/Solution or should I better use Team Explorer => Source Control (it seems even faster)?
What are situations when using Solution explorer is obviously better (or even the only) option?

like image 370
rem Avatar asked Oct 20 '11 05:10

rem


People also ask

How do I use source control in TFS?

1) Launch Visual Studio.NET and set TFS as the default source control repository. Go to Tools => Options => Source Control. Then click OK. Click OK to create the project.

Why Solution Explorer is used in Visual Studio?

Solution Explorer is a special window that enables you to manage solutions, projects, and files. It provides a complete view of the files in a project, and it enables you to add or remove files and to organize files into subfolders.

Is Microsoft moving away from TFS?

TFS is being renamed to Azure DevOps Server for the next major version, while VSTS (Visual Studio Team Services) has been renamed to Azure DevOps.

What is Source Control Explorer?

The Source Control Explorer is used to view and manage source control-related files and settings for your project. This window pane collects all source control information in one place so you do not need to open multiple windows or tabs when working with projects that are bound to source control.


1 Answers

Solution explorer is for working with solution, that is for development. When you are opening file from Solution explorer, you are opening a part of your project - VS takes into account what assemblies, namespaces etc. should be visible from this file, which gives you intellisense. Furthermore, context menus on Solution explorer are targeted at development process - notice all these "Build", "Rebuild", "Set as start up project" and so on.

When you are viewing your solution in Solution explorer, you see only those parts that are used in source code, I mean compiled files, resources etc. Moreover there might be a situation when you will have file included in the solution, but not included in source control, and the only place where one can see it is in Solution explorer.

Source control explorer on the other hand is for working with source control. It allows you adding and removing files in repository, checking in and checking out, updates etc. It has nothing to do with the development process directly - for example Source control explorer won't give you an opportunity to compile anything. Opening file in Source control explorer opens it as a single file - yes, it is still editable, but it does not now about the context, does not give you intellisense and so on.

When you are viewing your sources in Source control explorer, you are not limited to the individual solution. Imagine the situation when you have also folder with project documents (specs, mockups) in source control. You might not what to include them in your solution, but you still need to control them somehow - update their versions in source control, add new ones and so on. It is not possible while you are in Solution explorer, since you cannot see anything beyond the solution itself. Therefore the only place where you can work with these files is Source control explorer.

To sum up, Solution explorer is for working with source code, that is for development, Source control explorer is for working with repository.

like image 199
Andrei Avatar answered Oct 14 '22 20:10

Andrei