Automatically Shelve Changes with VS 2010 and TFS - visual-studio-2010

I am using Visual Studio 2010 and Team Foundation Server.
I was wondering if there is a way to automatically shelve the pending changes in my solution at a pre-scheduled time.
For example, I could have it run at 10:00pm everyday and always add the current date to the shelveset name. Something like "MyShelveset_02-11-2010".
Thanks,
Seth

All TFS actions can be ran from the command line, including the Shelve command.
This is very useful in your case since you can use it to script something and make it run automatically (with a scheduled task for example).

Related

Visual Studio 2022 changes the solution file. How do I disable this?

I work on a team that uses Ryder. I want to use Visual Studio 2022.
When I open the solution, Visual Studio makes a bunch of changes to the solution file (it modifies one of the project guids and adds debugging information for it).
I'm not allowed to check in these changes, nor are they needed, so every time I check anything in to git, I have to undo the changes to the solution file.
Is there any way to disable Visual Studio 2022 from doing this?
I've searched every setting I could think of and read the documentation but I can't find anything. I don't want Visual Studio to change my solution file if I haven't added or removed projects.
Though not exactly a "fix", I have a workaround that's been quite helpful from time to time. Copy the .sln file so you have a second one with a different filename. Let VS do what it wants to that second .sln without affecting the first one. You can take it one step further and gitignore the second file so that git will not constantly want to 'add' it to the repo.
I never did find a solution for this. I run a script every time I check in to undo the change to the solution file.
I am the only one on the team using Visual Studio and the team has strict rules about can be committed so this is the only solution.
It's not a problem now that I'm used to it, and I love Visual Studio 2022 so I'm willing to put up with it.

Visual Studio 2010 - TFS - Work offline also TFS server is available

I'm working in a big project in Visual Studio 2010. Often I must wait the check-in before doing simple test. How can I work with Visual Studio 2010 offline when TFS Server is available?
I'm not sure I understand your question 100%, but there are a couple of options depending on what you mean.
First of all, working offline is not possible with TFS 2010, but is available with local workspaces in TFS 2012 (overview in this article)
You say that you're waiting for check-in to complete. If you have a plain check-in situtation, then you have a couple of choices:
You can open a second instance of Visual Studio, and work while the first instance completes the check-in.
You can open a command prompt and use tf.exe checkin in your workspace directory.
If you have a gated check-in, then you can check the 'Preserve my pending changes locally', and you will be able to keep working on the changes until they have been validated and checked in. (further details in this article)
All that being said. A simple check-in should not take more than seconds. So if you're waiting a long time for a normal check-in situation, then you might have some performance/server issues.

Visual Studio 2010 - automatic git commit, push when file is saved

Is there a way to have Visual Studio 2010 automatically commit a file and push it to a git repository when the file is saved?
I would like to be able to have a pop up box appear to allow me to write the commit message on save. I feel that this would force some good habits on me, because sadly I can miss a day or ten of commits on occasion and as I am the sole developer this isn't a job requirement here.
From a configuration manager point of view I completely disagree with your "always commit" policy.
Insted, I don't know if have you tried Visual Local History 2005. I've used it in the 2005 and 2008 versions, but I've never tried with the 2010 version. It simply create a subdirectory and save there a local copy every save you make. So you could watch the history per-file.
THEN you could commit at the right point (when it really makes sense).
Let me know if it works as you would.

TFS 2008 Source Control configuration

Hope everyone here are doing great! Here is a situation where I need to know if there is a way to configure TFS source control in such a way that whenever I do a checkin I want to do a "Get Latest and build the local solution" first before I could actually do a checkin... as this would gaurantee me that every time I do a check in that the build will succeed.
However I am not sure if there is a way to automatically configure it in TFS?
Currently, I always do a "Get Latest" first, then I build the solution before I finally checkin the code provided the build succeeds.
Any suggestions or help will be deeply appreciated.
You will have to wait for TFS 2010 and it's "Gated Checkin" Feature.
More Info here, for example.
If you insist on doing this with TFS 2008 you could do it client side through a Visual Studio Add-In which either intercepts the checkin-command or offers a new "Safe Checkin" command, which then executes the get and build.

TFS won't recognise need to perform merge

A colleague and I are working on the same area of code using Visual Studio 2008 and TFS 2005 on the server.
When we both edit the same file concurrently and I check it in first, TFS does not recognise this when he either gets latest version or checks in, meaning his or my changes get overwritten without a painstaking manual merge.
This only seems to be a problem for him.
Any ideas what the problem might be or how we can fix it?
We removed and recreated the workspace and that fixed it. Job done.

Resources