Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically open Source Control Explorer when Visual Studio starts up

We use Visual Studio 2008/2010 and Team Foundation Server here at work. Sometimes I want to just use the Source Control Explorer. Is there a way to have Visual Studio launch and automatically open Source Control Explorer? I'm thinking ideally of having a shortcut on my taskbar or desktop that does this automatically.

And yes, I do know that if the Source Control Explorer window was open the last time I shut down Visual Studio it will open up, but I am wanting to always go straight to Source Control Explorer even if I had closed that window previously.

like image 604
David McClelland Avatar asked May 25 '10 18:05

David McClelland


People also ask

How do I bring up Source Control Explorer in Visual Studio?

Source Control Explorer is available in Visual Studio, but isn't opened by default when working with a project managed in TFVC. You can open the Source Control Explorer window: From the Team Explorer home page (Keyboard: Ctrl + 0, H), choose Source Control Explorer. From the menu bar.

How do I turn off Source Control in Visual Studio?

Right-Click If you have the File List open, right-click on any file and select Source Control > Project > Disconnect.

How do I use Source Control in Visual Studio?

Personalize your Git settings in Visual Studio 2019 To personalize and customize your Git settings at a repository level as well as at a global level, go to either Git > Settings on the menu bar, or to Tools > Options > Source Control on the menu bar. Then, choose the options you want.

What is Solution Explorer 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.


2 Answers

OK, I figured it out - Source Control Explorer is available in the Visual Studio IDE as a command (View.TfsSourceControlExplorer), and the Visual Studio executable (devenv.exe) provides the /Command argument to execute a command after the IDE starts up. In my case, I have created a desktop shortcut with the following command line:

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe"           /Command View.TfsSourceControlExplorer 

NOTE: if you really want this to load fast and don't need any other addins (in my case ReSharper and .NET Reflector Pro) then you can also add the /SafeMode argument to the command line.

like image 191
David McClelland Avatar answered Sep 21 '22 13:09

David McClelland


I use TFS every day at the office. I set up these things so that I can get to our Source repository quickly... (We use VS 2008)

  1. In Visual Studio... Open Tools->Options. Select Environement->Startup. In the "At startup" dropdown, select "Show empty environment". If have Source Control Explorer when close Visual Studio, it will be the only open window when you start Visual Studio again.

  2. In Visual Studio... Open Tools->Options. Select Environement->Keyboard. Find the command: View.TfsSourceControlExplorer. Set a shortcut for the command. (I like Alt-S)

Enjoy

like image 42
Dudly Avatar answered Sep 21 '22 13:09

Dudly