How to group excluded from source control files (TFS, Visual Studio) - visual-studio

Is it possible to group them to a folder (or workitem) or something similar, and how?
edit:
I am asking because sometimes when working on a task I need to jump to another and check in only the other task changes and exclude all others. Later when I get back to the first one I want to be able to resume the work in progress. It is OK if I only jump between two tasks, but if there are 3 and more changes (on a particular task) cannot be tracked fast.
I searched SO but did not find answer, also vs ui does not seem to provide the option.
Visual Studio 2017 Enterprise,
Microsoft Visual Studio Team Foundation Server
Version 15.117.26714.0

What you are doing is not a recommend way in TFS. It's not the really usage of excluded list.You should use Shelveset instead.
Sometimes you need to set aside some or all of your work in progress. Shelvesets are useful when you want to stop work for:
Interruption: You have pending changes that are not ready for check in, but you need to work on a different task.
Collaboration: You have pending changes that are not ready for check in but you need to share them with another team member.
..
You could simply suspend and resume your work from the My Work page, more details please refer this tutorial--Suspend your work and manage your shelvesets

Related

Visual Studio 2010 / TFS set "local" comments?

I'm working in VS 2010 and am connected to a Team Foundation Server.
In order to edit source files I have to check them out from the server. After I'm done with editing, I have to check them back in (to make changes visible to everyone else) or discard changes.
I am currently in the process of getting acquainted with the architecture and systems, so I'd like to add a lot of personal comments while I play around with everything.
However I'd prefer to not make these comments visible to everyone else. (And I dont want to delete them everytime I commit changes via check-in)
Is there a VS function I did not yet discover or a plugin that allows me to enter comments that dont get commited to the TFS? Maybe something like virtual post-its, just something that lets me attach stupid reminders on certain blocks of code?
(yes I know, proper documentation would make this obsolete but the system is as it is and its huge and I'm not the one to document this all, just want to get used to the code)
VS2010/TFS2010 no built in functionality that I know of, for TFS2012 you could possibly use code reviews.
Maybe the Visual studio extension StickyNotes is what you want.

Disable warning that solution is not under source control?

Shamefully, we use TFS at work for a C# project. I wish we could move to svn or git, but we can't change that. All of us working on the project hate the automatic check-out "feature" of TFS, so we checked in our solution and project files as unbound from TFS.
Now, whenever we open the project, we get the following message:
The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?
Is there a way to disable this message while keeping the solution unbound from the buggy and annoying integrated source control?
The message you reference has nothing to do with TFS, it has to do with integrated source control within Visual Studio. If you really want to get rid of this message, go to Tools->Options->Source Control and set your source control provider to "none."
Then, go and download the Team Foundation Power Tools and enable the shell access, and you'll be able to right click within Windows Explorer and check in from there. If you don't want to do that, you can do your check-ins from the TF.EXE command line.
But seriously, if you don't like the automatic check-out, then just turn that off. You have the option of having TFS automatically check out, prompt you for check out, or do nothing and leave the files in a read-only state until you explicitly check them out.
Another possibility could be to move to a 'git-tfs' combined solution. You would move your team to git, and sync with TFS on a regular basis. This way, only one person has to live with the TFS annoyances.
I have no experience with that, but apparently it has been tried before
If you like the svn/git model better, then I honestly wonder why you would want to turn off automatic checkout? You can configure VS to silently check out files on edit. This comes pretty close to the svn way of working, no?
Also, ensure that the TFS server is configured to allow multiple checkout on all text-based files, and you should be good to go. You can also install your own diff and merge tools (e.g. TortoiseDiff/TortoiseMerge) if you want.

Visual Studio locking files while debugging

I have a VS solution containing several projects. While debugging a particular project all the source files are locked by VS. I would like to unlock sources that the debugee doesn't have dependency on. Is there any way to do this within one solution?
UPDATE:
I'm using Win XP SP3 32bit. Visual Studio 2010, C#. Edit and Continue is enabled. The solution contains 6 projects (number in not important actually), 5 of them depend on the data access layer project which uses Entity Framework. None of the 5 have any mutual dependencies. They are WinForms and Console applications. I would like to be able to run one of the projects and make changes to others without stopping the first. The problem is starting and stopping the project take considerable amount of time.
The Edit and Continue feature is preventing you from editing files if the debugger hasn't stopped the program. The simple workaround is Debug + Break All, you should then be able to edit the files, your changes will be immediately effective provided your changes do not violate the restrictions imposed by E+C. This is the most efficient work flow.
The heavy-handed approach is to disable Edit and Continue. Tools + Options, Debugger, Edit and Continue, uncheck the Enable check box.
I don't think that there is a way to avoid that. While debugging Visual Studio lock all files to prevent any change on them, including those on other projects.
You can try to open the project which you are interested on with another Visual Studio instance to make changes to your files or open files singularly with another editor.
This doesn't quite answer the OP's question per se, but for anyone who has stumbled upon this page in the same (very frustrated) boat as I am, this might help.
The solution: start without debugging.
It was driving me absolutely crazy that Visual Studio would not let me edit files while the app was running. My typical workflow is:
Make some changes
Run the app to see the effects of those changes
Based on the results, make more changes, etc. etc.
The problem is Visual Studio was preventing me from step 3. It demands that you STOP running the app before you can even make any changes (including to a XAML file or adding a file to the project), which also means that you can't go back to the app to double-check something while you are actually programming it at the same time (which is how I work, bro).
Thank god I finally discovered if I run without debugging it doesn't impose this ridiculous limitation. It's still a pain in the butt if you actually need to debug something you have to re-run the app in debug mode, but it sure beats having to kill the app before it will even let you edit a file.

Incorrect states on TFS 2008 Project Files

I have a project stored in TFS Source Control (2008) that is being worked on by 2 developers. All 3 versions (Developer1, Developer2 and Server) are up to date with each other. However, both Developers report that some files in Solution Explorer say 'Checked out by someone else or in another place' - but the same files viewed in Source Control Explorer say they are available. It seems as though the workspaces have gotten confused but the actual files are 'good'.
Can anyone help?
I've had these lists get out of sync before. What was required was a "Force Get Latest" to refresh the statuses. To do that, you select "Get a specific version", and then select "Latest" and "Get file even if they already exist locally" (or some option like that). This will force the files to refresh, even if they're already up to date, and should also correct their status.
You would think VS/TFS would be smart enough to reconcile this on their own, but sometimes they just don't, for whatever reason.
If I check out the file and then do a "Undo pending changes" it goes back to normal. I think it's this bug, and it doesn't seem to be fixed in any patches or a future version yet.
http://social.msdn.microsoft.com/Forums/en-SG/tfsversioncontrol/thread/2a1c6a8c-0a2b-460c-9335-e31598f1107b
Go to File->Source Control->Workspaces in Visual Studio. Make sure that the devs you have only have 1 workspace. It's likely that someone has created multiple workspaces on his machine and have files checked out there.
TFS maps workspaces to locations on the machine they are created on so if someone pulled down code to multiple places and edited it, you can have one person with code checked out in multiple places.
Also, this link shows you how to see all the files checked out for a particular person.
But I also agree with Preet. It's perfectly OK to have the file checked out by more than one person in TFS. That's one of the minor improvements over SourceSafe.
Do you have SP1 installed? This fixed it for our team. If not, check if any of your devs have separate workspaces and may have checked out files to it
We had this problem when we upgraded from TFS 2005 to TFS 2008. There were problems with the upgrade that forced us to create a new virtual machine and restore/upgrade the 2005 database. We were under workgroup authentication and re-created local user accounts but since they all had new SIDs they were considered different accounts in some respects. All of the original users' workspaces hung around.
Take a look at the commandline tf and tfpt tools for manipulating workspaces, see if you have something orphaned. Attrice Team Foundation Sidekicks has a nice GUI workspaces manager too.
A bigger question. Why do you care if someone else has a file checked out? TFS supports multiple parallel checkouts on files. If you want exclusive control then use a lock.
Sorry to be clearer - I often find that the state in Solution explorer is not worth looking at. If I need a file I check it out. If someone's locked it then I have get told by TFS at that time, otherwise I just work with the file.

SVN plugin for VS2008

I'm using VisualSVN with my Visual Studio 2008 and I have to run some sort of commit monitor in the tray area to see if the local copy of project is out of date.
I have two problems with that:
I hate to have it in two places, I want to see that as an icon in my VS,
The commit monitor software keeps an eye on several projects, when I work on project 1 (which VS knows about), I'm not interested in other projects.
I couldn't find any addons for Visual Studio to do that and was wondering if anyone knows about anything good.
Generally, you have 2 options (besides running commitmonitor as you already do):
run update before you start to change something
ignore it all and merge with any updates when you want to commit.
SVN's really designed around the 'wait until you're ready and merge it all together' model, as there's no guarantee that even if you update your working copy immediately before starting to modify it, someone won't commit changes before you've had a chance to commit. So, let the system do the work for you.
The ultimate alternative if you are worried about conflicts is to use the svn:needs-lock property which means you will have to get a lock on any file you modify before modifying it, and you won't be able to get a lock on a file someone else is modifying.
You might like to ask the VisualSVN people if they'd add an option to check the repository when a project is loaded by VS (or run AnkhSVN and implement this feature yourself).
Work has started in AnkhSVN in this direction, we started to implement the 'Synchronize View' that's also used in Eclipse/Subclipse. The things still missing are: Scheduled checking of the repository, and maybe a notification inside VS to tell you that something has changed.
Right now you can manually refresh this view to see local and remote changes (and merges which can be potential conflicts). Patches are welcome to extend this feature :-)
I'm assuming VisualSVN is your "server" (even if running on the same machine).
AnkhSVN is a good Visual Studio Integrated SVN Client.

Resources