TFS Files checkout whenever build the solution - visual-studio-2010

I have VS 2010 in machine which is connected to TFS server. Now the problem is i have 10+ projects in my solution. whenever i try to build some of the projects would be checked out by itself. i tried many things but no luck , each time i have to undo checkout and then other people can work.

Try to Rebind project with TFS server and Re-Map it with your project folder. then retry & Re-build.

Related

How to force TFS server to take all of my local files?

I have a couple of ASP.NET Core based projects being developed using Visual Studio 2019.
I am having issues where my workspace and TFS server on Azure-DevOps are out of sync. My PC contains the most recent code and I want to push everything I have on the server. I don't really care about the status of the TFS server as it is wrong. I just want to force everything to get pushed to ensure my PC and TFS are syncing again.
How can I force the TFS on Azure-DevOps to take all my files? I don't even mind removing the project altogether from Azure-DevOps and push all files as if this is a new project.
According to your description, sounds like there is something wrong with your source control binding. Or maybe some files outside of Visual Studio do not detect by TFS server. Which cause your workspace and TFS server out of sync.
If you want TFS server detect changes done to files outside of Visual Studio, the simplest way is using local workspace.
Now anything else changes files outside Visual Studio, your workspace detects the changes automatically.
It also detects adds or deletes but you have to include them to your Pending Changes manually with the link under `Excluded Changes
If you are using server workspace, this is kind like when you are offline, you cannot work with your local files because they are read-only until you check them out. So highly recommend you switch to local workspace, you just need to make sure you open the files in VS from a path which the same as your TFS local worksapce. Then it will auto sync changes in Visual Studio and show in pending changes.
More detailed information on the pros and cons of local and server workspaces, please refer our official link.
Now in your situation, we suggest you fist back up all of your local codes/files first. Then delete your old workspace, create a new local workspace.
Get latest from your sever, then copy all your back up to your workspace folder. Then let windows file system auto detect the difference between them, replace files download from server with your back up local version.
Now your local workspace should contain the latest version of your code/file, Visual Studio will auto detect the changes and list them in pending changes, if something added in excluded list, manually promote them.
Finally you could just check in/push all pending changes to TFS server. Now everything back to the track again.
Hope this helps.

How to automate excluding deleted files on checkin?

I have a VERY large project which just went through an upgrade process. The upgrade is a process external to Visual Studio. As a result, files that are deleted by the upgrade process do not get properly detected by TFS so TFS pukes on checkin saying that it can't find the file.
The problem is that there are several hundred files that need to be excluded to resolve the issue. I could do this for days before I'm done. I'm pretty sure my boss would prefer it not take several days.
Is there a quick way to find and automate the exclusion of these files so I can just be done with it?
You have two options...
Use a Local Workspace - if you go into the settings of your Workspace you can change it from Server to Local. This will allow the changes to be detected automatically. You may need to copy everything out and then back in if you have already made the changes...
Reconcile the difference - You can use the TFS 2013 Power Tools and the "tfpt online /adds /deletes /diff /noprompt /recursive directory-name" command...How to have TFS 2010 detect changes done to files outside of Visual Studio?

How to delete all workspaces in TFS 2010

How do I delete all workspaces on the automated build server? We had an issue where we had to keep changing the credentials on the build agent for TFS 2010, and then if we tried to deploy the build next time for all our build definitions it gave the error that the workspace already existed under a different user.
I know we can do this:
tf workspace /delete /server:http://localhost:8080/tfs/DefaultCollection 26_1_internalserver123;MYOFFICE\brian.colley
But we have to manually do that for every build definition, and we don't really know the workspace number until we try and run the build and it gives the error.
In MSDN it says you can do a /remove:, but /delete: doesn't work (or isn't even in the msdn command options which is weird). I didn't know if remove is doing something that I don't want, versus delete.
Should I do this, or will it mess up all the users in TFS on their local boxes?
c:\projects>tf workspaces /remove:* /collection:http://myserver:8080/tfs/DefaultCollection
Thanks!
Install TFS Sidekicks, you can clean them up with a nice pretty GUI.
you can filter by the build account and a machine and then delete only the specific workspaces you are interested in

How to I disconnect VisualSVN from my Solution?

So I just downloaded TortoiseSVN, VisualSVN and VisualSVN Server. I created a new repository and through VS2010, added my solution to said repository. I then realized that I had some naming issues with my repository so I deleted it using the VisualSVN Server Manager thinking that I could go back to VS2010 and somehow drop the solutions connection to SVN, but I cannot figure out any way to do this? I essentially want to start from scratch with this solution/connecting to SVN but I cannot seem to find a way for it to offer me the initial "Add this Solution to SVN" option. I don't know if this is a TortiseSVN issue or VisualSVN but any advice would be greatly appreciated!
Close Visual Studio then remove the subversion info by deleting all .svn folders recursively below the project folder. They are hidden so you will need to enable viewing of hidden files and folders. Open Visual Studio and VisualSVN should offer to add the solution to subversion again.

Visual Studio/Sourcesafe checkout problem

After a branch was created of a project I was working on, I don't seem to be able to checkout resource files anymore. I checked the sourcesafe with the administration tool, and I have sufficient rights on the project. I can checkout the files straight from sourcesafe, but I can't checkout the files from visual studio. anyone know why?
Start with File/Source control/Change Source Control and make sure you have things bound correctly for your project.

Resources