I am trying to branch a directory in TFS using the Source Control explorer, however whenever I do, I always get this error:
TF400962: There was a database update error. Please try your operation again.
This occurs after confirming I would like to branch after it informs me that it will be committed as a single operation, pending changes will not be created and that it cannot be canceled when it is started.
I have been stuck on this for a while now and I can't seem to find any solution to this, here is a list of things I have tried.
Made sure the Target Branch Name is below 255 characters (As suggested here). I also made sure the whole path on my machine was also less than 255 characters.
Changed workspaces.
Updated Visual Studio to the latest version.
Restarted Visual Studio.
Restarted my machine.
Branched another directory (To see if the directory I need to branch isn't throwing the error).
Made sure connection to the TFS server was correct.
Checked that I had the correct settings in the workspace.
Downloaded the directory I am trying to branch to my PC.
I have ran out of ideas and it really is frustrating me. Any help would be appreciated. I'm using Visual Studio 2017 Enterprise now running on the latest updates.
Check if you had a deleted branch in the path you are trying to branch to.
Steps to reproduce:
Have code at $/path/to/main
Branch from $/path/to/main to $/another/path/dev
Delete $/another/path/dev
Try to branch from $/path/to/main to $/another/path/dev/branch
-> TF400962
Problem seems to be that $/another/path/dev/branch overlaps with deleted branch $/another/path/dev
Resolution:
Show deleted elements in TFS Explorer
Convert deleted branch $/another/path/dev/branch to regular folder
Branch from $/path/to/main to $/another/path/dev/branch
-> Success!
The error you are getting a generic error that could happen because of any TFS SQL Server related issue. Please check events logs on your TFS's SQL server machine. You might find more information there.
There is more information here
https://connect.microsoft.com/VisualStudio/feedback/details/1128642/tf400962-there-was-a-database-update-error-please-try-your-operation-again
Make sure your TFS DB is not out of disk space.
Related
No matter what I do, when I touch TFS in any way, it gives me the error:
TF400030: The local data store is currently in use by another operation. Please wait and then try your operation again. If this error persists, restart the application.
Well not everything, I can see a list of workspaces (all 1 of them). But trying to view the workspace in the source control explorer will only show "Working..." Pending changes can only show me there are 654 included changes (a migration, don't judge), but none of the actual changed files and strangely none of the excluded changes.
I tried to nuke this workspace and rebuild it from scratch. But even using tf.exe workspace /delete ..., right after a fresh reboot, will give me the above error.
I tried deleting all VS / TFS related folders from AppData\Local\Microsoft and running devenv.exe /resetuserdata afterwards as explained by Willy-P. Schaub.
Then running tf.exe workspaces results in No workspace matching * found on this computer. ... until starting VS again, after which my workspace is visible again
As explained by Philip Kelly the TF400030 error might be because of a scanner running. But I don't know how to locate / kill such a scanner and no process on my PC is doing any significant IO.
I fear spending the time to reinstall VS would result in this exact same situation and reinstalling my PC seems a bit excessive.
Is there a way to make the TFS client forget about my local workspace? Or even better hunt down and kill whatever other process causes the TF400030?
sigh sometimes the answer is so easy: I just rename the mapped folder on disk and TFS started responding again.
Today, while trying to publish an app so I could test it, I suddenly got this error message:
The item
D:\ScratchSrc\TryNewReportViewer2017\TryNewReportViewer2017\TryNewReportViewer2017.csproj.vspscc
could not be found in your workspace, or you do not have permission to
access it.
That's a mystery to me, as I've never gotten this before and I was working with this app just last week. Publishing it, too.
I've looked for the .vspscc file. Found it exactly where it said it should be. So, the alternative is that I don't have permissions to it. I don't understand why I shouldn't have permissions to a file on my machine that I created, but whatever. So, how do I get permissions to my own file?
I'm working with VS 2017, TFS 2015 on premise.
This issue may due to the wrong source control binding for that specific xx.vspscc file.
Double check your source control bindings for that file in TFS. You could also try to unbind and rebind the file.
Then delete the file in local(back up local changes first) and get latest version from TFS. Finally do the publish again.
If above solution is still not working, try to delete local workspace and create a new one, get latest version of the file, modify the file with local changes (if you have) in your backup , check in the file, then do the publish .
Another reason for this problem is, that the vspscc file is not checked in.
Just do a "Compare" on the project folder to see, if it's missing.
If the csproj.vspscc is missing you can create a new one by removing the project in visual studio and adding it back
I was able to 'fix' the problem by going to the source control explorer, selecting the smproj file (which was checked out for editing), and checked it in by itself. Then, I checked in the Model.bim. Was able to do both of these things without getting the error.
I also tried all the usual things, deleting the entire solution directory, getting it from TFS again but nothing worked.
Noticed the version of Visual Studio 2019 was a few months old so upgraded to the latest. That fixed it!
I have a scenario I am hoping someone will be able to help me think through and determine the best way to handle. The tools I am using are Visual Studio 2013 and TFS.
We had a developer leave our company abruptly, and he has a lot of code changes for a client project which were not yet checked in. We have the code base with his changes locally. We also have the client's TFS server with the latest code. I do not have documentation of his changes, so my goal is to find all the code changes he has made. Keep in mind I also do not have access to his machine, I just have access to the local code base which he was working on, which includes his changes.
I began by comparing his code with the client's code on TFS, and looking for changes. However the client has also made some changes to their code in the 2 months since this developer began working on this project. So within those two months he made some changes locally and the client also made some changes which were checked in on TFS.
When I compare his code to the latest copy of code on the server, I can see the differences, but I can't seem to tell who made the changes. If a method was modified, I see that different versions exist on TFS and in this local code, but I cannot tell who made the change. Did the client make the change to the code, and the newer version on TFS makes my version look out of date? Or did this developer make the change to the code, making the server code look out of date? As the changes done by our developer were not checked in, I do not have a history showing me who made the changes to the code. What would be the best way to determine the changes our local developer made?
So, to sum it up: I have compared his local code to server code, and have seen the differences, but the client has also made changes to code since he acquired it. So the differences between his code and server code could either be due to his changes or client changes, but I don't know which.
I see a few ways which could make your life easier, but it requires you to know which version your developer initially downloaded. With that version (Changeset, Label, Date) you can make a comparison against the local workspace and find all the changes to that version on the server.
Workspace version
You can initiate the diff from the commandline (as well as from Visual Studio, but command lines are much easier to post on Stack Overflow):
tf folderdiff c:\sources "$/TFSProject/Path/To/Sources;C12345" /recursive
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
/view:different,sourceonly
In the place of C12345 you can either enter the Changeset number that was used to create the workspace on your developer's machine or the label (use Llabelname instead of Cnumber) or the (approximate) date (use D2014-12-20).
This will output a list of files that have changed locally against the version that was used to create the workspace. Now you can list each file individually using:
tf diff c:\sources\changedfile.cs /version:C12345
(or use the same version spec as above if you used Labels or a Date).
There is another option, if the workspace is still registered on the TFS server, and that is to compare against the workspace version:
tf folderdiff c:\sources "$/TFSProject/Path/To/Sources;Wworkspacename;owner" /recursive
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
/view:different,sourceonly`
Followed by:
tf diff c:\sources\changedfile.cs /version:Wworkspacename;owner
You do not need to own the workspace in order to do this, but the server must still have a record for that workspace on the server. You can try finding the workspace using the command:
C:\Sources\>tf workspaces /owner:avanade-corp\jesse.houwing /computer:jessehouwing
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
Collection: http://your.client.tfsserver.com:8080/tfs/ProjectCollection
Workspace Owner Computer Comment
----------------------- ------------- ------------ ----------------------------
JESSEHOUWING Jesse Houwing JESSEHOUWING
The example above would lead to:
tf folderdiff c:\sources "$/TFSProject/Path/To/Sources;WJESSEHOUWING;Jesse Houwing" /recursive
/collection:http://your.client.tfsserver.com:8080/tfs/ProjectCollection
/view:different,sourceonly
Create a shelfset
If you do have the option to get access to the system (even if logged on as a different user) you can take ownership of the workspace and create a Shelveset of the changes. You can then unshelve these changes on a more recent workspace and Visual Studio will prompt you to resolve merge conflicts. TFS will know which changes were made by the other party and will try to auto-merge the changes as best it can.
I'm getting this message when connected to a TFS repository and trying to edit a local .sql file that's not yet in the repository.
The item C:\bla\blabla\blablabla\USP_BLA.sql could not be found in
your workspace, or you do not have permission to access it. No items
were checked out
If I disconnect from the TFS repository everything is fine. If I re-connect to the TFS repository I start getting the message, even just trying to type/save the file.
The file is actually there in my local folder and I have the corresponding permissions, for those who are thinking otherwise. It is just a text file that I should be able to edit irrespective of whether I'm connected to the repository or not.
I got Windows SP1 installed on my Windows 7 this morning; don't know if that could be the cause of the issue. We are using the.NET Framework 4.
Any idea of what the issue is or how to resolve it?
It turns out the issue was with one of the "facts" in my question, "file that's not yet in the repository".
A file with the same file name I had locally was already there in the TFS repository, it had been checked-in a month ago by someone else.
Only when I tried to check-in the new local copy I became aware of that; the file was not supposed to be there.
Anyway, after checking-out the file from TFS everything went back to normal; I'm able to edit/save the file without issues, even if connected to TFS.
Try to get the latest version of your source code It should resolve the issue..Or Get Specific Version and allow to overwrite existing files.If still does not resolve make sure the file is present on local directory.
Do not forget to rebuild after getting latest code
I'm trying to utilize SVNBridge so that my team can use our existing TFS server as our Xcode repository.
SVNBridge appears to be set up correctly on the TFS server, and I can connect to it from Xcode as an SVN repository to grab everything and commit changes.
However, when I have another member of my team update to grab a file I just committed, they receive the following error:
svn: REPORT of '/!svn/bc/36163/-TFS folder structure-': 200 OK (http://-tfs server url-:8081)
The also happens when they update a file, and I then try to update.
We both have full read/write access to the TFS structure.
There is nothing in the SVNBride logs folder on the TFS server.
Any thoughts on the error, or is there a better solution I should use for this?
y0-1, happens all the time for me.
Possible causes are
1) urlscan, check the logs
2) ..svnbridge folders, I usually connect to TFS with native client and delete them, it's a pain cause there are a lot of them usually. After deleting ..svnbridge folders you might want to re-checkout parts of your project where you deleted them and sometimes svnbridge restart is required.
Also svnbridge log usually conatains very usefull info ;)
p.s.
Just realized, that you said that your svnbridge log is clean, that's odd, maybe it is not configured properly(usually folder permissions)
f.e. mine svnbridge log with the similar error on update -
Message : The item 'blah-blah-blah' does not exist at the specified version.
User :
Request : REPORT /!svn/vcc/default HTTP/1.1