TFS and working with multiple solutions - visual-studio

How do people generally deal with TFS when you've got to work with multiple solution files? If you've got one instance it's easy because you can always go to that window for the source control explorer, pending changes, check on builds or work items. But when you have 4-5 solutions, it becomes tricky to deal with. You might expand some folders or check some pending items on one VS instance but you have to remember which one you did it on.
Having a separate instance dedicated just to TFS tasks is tempting, but there's only one window state for the whole program. If that instance is closed last, all instances will come up with all the TFS windows open.
How do other people deal with this? Can you use separate profiles somehow and cordon off a "TFS" instance of Visual Studio?

Use the Pending Changes window. View -> Other Windows -> Pending Changes. This has a toolbar option to show only those changes pending for the current solution also. It's the last toolbar button in the Pending Changes window. I usually make this a full document in VS and then memorize the keyboard shortcut to it: ALT+V, E, H. Obviously you could bind your own shortcut, but what fun is that.
Eclipse has a similar perspective/view to Pending Changes, but it's name escapes me and I don't have my Ubuntu VM up at the moment.
Solution Explorer and Source Control Explorer are definitely not my recommendation for check-in activities. I personally like to clear out all of the checkboxes on Pending Changes and then Diff each file. This keeps me from A) waiting too long before a checkin (it sucks to compare 20 files 1 by 1) and B) avoids checking in a change I didn't intend.

If you have multiple instances of Visual Studio open at one time (which I'm not quite sure why you would need to do this), your changes are "synchronized" across all instances of Visual Studio. Don't do your check-in from the solution explorer, do it from the Source Control explorer, then you're sure to get all your updates in a single check-in.

You might find VSCommands useful when working with VS/TFS - it can be configured to display the Solution and TFS Branch name in the title bar, this indication is invaluable when working with multiple instances of VS (or multiple branches of the same project).

Related

Visual Studio 2015 - Two instances, same solution - how to retain two view states?

I have a solution that I view with two separate instances of visual studio; One for the main app project, and the other for the web service project.
Visual Studio will restore the view state (which windows are opened, how they are situated (split screen, etc...)) of the last closed solution. This makes sense, I'm sure it is general OS functionality provided to all apps - cache out view state to the registry (notepad++ retains view state too).
I want to be able to retain and restore two separate view states. I know if I move the web service into it's own solution that I will get this desired behavior, but an architectural decision was made to roll it into the main solution, so it is not an option.
I need a way to snatch the view state from the registry somehow, and then maybe use a command switch when launching VS to tell it which to use (I guess I need reg and file monitor to see where it is caching to)??
Any ideas or suggestions (reg hacks welcome)?

Visual Studio 2013 Hide Notification Button

I have a question about Visual Studio 2013.
I just installed it and it seems pretty good because of the new features.
But there is something I do not like:
Is it possible somehow removing these 3 x buttons ? Or just one of them?
Yes you can hide them.
Close Visual Studio.
Open regedit and find MainWindowFrameControls.
For example I want to remove:
1) Sign In
2) Notifications
So I need to delete:
{304ee989-b7c9-46c8-aa48-f080bc47cee0}
{73988e61-7e30-4e87-b891-23b5e460db21}
You can also delete them and it will work (you can remove feedback also by this way).
Although sometime VS recreates that keys. But solution is very easy - instead of deleting make right click and go to Permissions, add Everyone - Deny - Read. So now nobody will be able to read that keys including VS.
You can remove it to go to original state by the same way.
At the moment the social features don't seem to have any corresponding options you can use to disable them.
There is a method that relies on using Visual Commander extension to repeatedly hide some of the buttons (as Visual Studio
often recreates them), which seems like the closest you'll get for the moment.
http://visualstudioextensions.vlasovstudio.com/2013/10/19/hide-sign-in-and-feedback-buttons-in-the-visual-studio-2013-main-window/ - You can view the code in the "Extensions" section.
Unless you're desparate to get rid of them, you're probably better of trying to ignore them, hopefully an option to hide them will become available.
You can use the Disable Social Features extension, which will programmatically hide both the 'smiley' buttons as well as your own name/photo from the front of Visual Studio.

Can I get VS2010 to look at VSS when I click Open Project?

My VS2010 environment has the start page come up if I'm not opening a solution. From there, I can open one of the several items on the recent projects list or I can open a project from the link/button in the upper left. When I do that, I get an Open Project dialog that's pointed at my C:\workingvss (which is a convention that everyone on my team follows for where our code lives locally). But I virtually always want to browse to the project in a VSS database and I have to scroll up in the left-hand pane of the dialog to bring 'Microsoft Visual SourceSafe' into visibility. It seems dumb that I can't make it just start at the top of the pane, but if there's a way, I haven't been able to figure out how.
So I'm turning to you. Is there something I can do to avoid this click and drag every time I want to open a project?
I realize it's defaulting to the Projects location parameter set through Tools > Options > Projects and Solutions > General. But I think I need to leave that as is because I do want my stuff saved to that location during checkout.
I also think that if I removed ten (in my case) folders from the root of my C:, the left pane would show my VSS option, but I don't think that's even possible in this machine's case and not a reasonable solution in any case.
My question is related to, but not a duplicate of, How to change the default open file dialog path.
Thanks for your time!
This isn't a great answer, but it's my current no-tech work-around. If I make the Open Project dialog large enough to accommodate all of the lines it wants to display, then my VSS line is visible and I don't have to navigate to it. Luckily, Visual Studio remembers the size from use to use.

Stop Visual Studio asking for each project: has been modified outside the environment. Do you wish to reload?

Do you wish to reload the project? Where's the Reload All option.
Vote for this question and hopefully MS will implement a fix in VS2020.
With pleany of projects in a solution I for one dread doing an svn update.
This has been an issue from VS2003 but after a decade of clicking mindlessly on buttons it's getting on my wick.
Does anyone have a hack / registry entry / secret way of saying yes short of saying ignore (quick), closing and reloading the solution?
There are a couple of options you can tweak for this scenario. Both are under the Documents Options
Tools -> Options
Environment -> Documents
The first option is to just uncheck "Detect when files changed outside the environment". This will stop the reload dialog but will force you to manually reload.
The second option just below it is a bit better "Auto-load changes, if saved". This will just automatically load the changes without prompting you for every project.
Personally though I would go a slightly different route here. The problem is occuring because your managing your source code control outside of Visual Studio. If you switched to using an addin to manage within Visual Studio it would remove these problems altogether. For svn there are several free packages available including Ankhsvn which is fairly popular
http://msdn.microsoft.com/en-us/library/ms165643(VS.80).aspx
DetectFileChangesOutsideIDE
Get/Set (Boolean)
Determines whether the environment automatically reloads files opened in the IDE when the operating system notifies the IDE that the files have been modified on disk.
EDIT:
Some clarification, as that page isn't immediately obvious.
Tools Menu->Options -> Environment->Documents->Uncheck Detect when file is changed outside the Environment

Silly Visual Studio Pending Changes Question

I recently switched from a Java based project to a C#/.net project. I previously used IntelliJ which had the concept of change lists where you could group your pending changes together and check each group in individually.
I have two problems with the pending changes window in visual studio.
1) Every time I check anything in, visual studio checks the checkbox beside Every pending change in the list forcing me to uncheck each and every one of them so I don't accidentally check something in. This is extremely frustrating because there are several files that I need to keep changed to correctly run my code locally. Is there any way to change this default behavior to not check any pending changes on check-in?
2) Is there any way to group changes into lists as opposed one big bucket of changes? Again this becomes frustrating when I need to check something in, but I have to search through the files and check the pertinent changes. I understand that shelve sets exist using TFS, but that doesn't cut it for me, especially since I have several changed files that I need to keep altered in order to correctly deploy locally, and I rarely ever want to check in.
Thanks in advance!
I have to manage lots of changes every day in Visual Studio, and I've got a few tips for you, but no silver bullet:
Use Ctrl+A to select all items and then press a checkbox to toggle the checkboxes for all items. This can be useful when performing changes to only a few items -- just uncheck everything, then make sure you have only the items checked that you'd like to update.
Use Ctrl+Click (then right-click) to 'Undo' selected changes. By default, the undo action will only apply to the selected items.
You might want to experiment with using multiple Workspaces -- and then filtering changes by workspace or by solution.
No, I don't know of a way to fix your problems. It sounds like the best answer would be to refactor your configuration settings or code so that you can check in all of your changes.
If your changes are in different projects you can partition what you check in using the Source Control Explorer by right clicking on the project folder and checking in that way. It will auto check only the files in the folder you right click on. Just keep in mind the Source Control Explorer gives you some other options. Otherwise, I do not know of a way to manually control your change sets file-by-file thought if this exists I would like to know about it too.
You can also use Ctrl+A to select all items and then press Spacebar to toggle the checkedboxes as checked/unchecked.

Resources