TFS Web Portal - Document locked for editing by my user - tfs

This is more than likely a very simple question but I can not find the answer via any of my google searches.
I am trying to update a word document via the TFS web portal. I have tried via VS2010 as well and get the same issues. Once I attempt to open the document as "Edit", I get a notice "This file is locked for editing by MYDOMAIN\myusername".
Looking online, I have found several articles stating I need to delete the file on my workspace, but I can not find the file since it is not in the Source Control section of TFS.
Is there a way to cancel my lock on the file so that I can edit the file?

If you are using TFS2010, you can try to undo anyone's checkout with the following command:
tf undo {file path} /workspace:{workspace};{username}
Details please refer this blog How to force undo checkout? #TFS
You can also use the Status Sidekick of TFS Sidekicks tool and unlock the files which are checked out.
Detail steps you can refer the answer from Tim Partridge in this similar question How to unlock a file from someone else in Team Foundation Server

To help anyone that may have issues with this in the future, I was able to correct this issue in Windows 10 by clicking on the icon for File Upload Center and canceling the attempt to upload the document.
Once I restarted my computer, I was able to open the file and edit with no issues.

Related

Why can't I open a task of a read-only .dtsx file?

We are using TFS and we have a SSIS project with exclusive checkout.
A colleague has a file F.dtsx in checkout.
I open with VS2015 the F.dtsx and I can correctly see the Control Flow.
When I try to open a task, it asks me to take F.dtsx in checkout and of course I can't. So I can't see what's in the task even if I just want to READ it.
How can I do?
Thanks
Copy the F.dtsx package to another package and open that. You'd have control of it. You can undo your checkout when you're done.
The file is locked with your colleague. So, if you don't want to change your current process, you need to ask your colleague to release the file.
Or, you can try to unlock the file, reference below thread:
Eclipse TFS check out error can't show file
How to unlock a file from someone else in Team Foundation Server
If you just need to read, just as Rich said, get a copy to read.

Export TFS items with attachments and history and send them to some one who doesn't have access to local TFS

We are working with an offshore development team, I need to send them on a daily basis the list of available bugs and work items from local TFS. I could not find any ready component that would help with exporting the bugs details along with history comments, and attachments.
The excel sheet thing, helps if you want to send it to some one who also has access to the TFS server.
Any clue?
Thanks for the #Daniel and #Cece for your help guys.
I created a solution using .NET TFS assemblies, to help me with this task. The tool connects to TFS and allows you to choose one of your saved queries. It will then export all the bugs / work items information into a folder as HTML, and it will include the attachments and comments on bug if any. It also creates a nice index page.
In case this helps any one, here is the link to download release one excutables from codeplex
https://tfsworkitemsexporter.codeplex.com/
please also feel free to copy the code and edit as you like
You would need to use TFS API to get the attachments and history. Check the REST API:
https://XXX.visualstudio.com/DefaultCollection/_apis/wit/workitems?ids=xx&$expand=all&api-version=1.0

Get or download Shelf Code in Team Foundation Server (TFS)

I am fairly new to TFS, like Mel from this post:
https://softwareengineering.stackexchange.com/q/142977/27650
I had a project on another PC, but I have been issued another PC.
Yes, I could go to management, and bug them with all of the various steps involved with finding and then getting my shelf project that I was working on last week, but I would rather find the information on my own.
I found MSDN's article on Shelve and Unshelve Pending Changes, but it did not cover how to get my shelf item. Perhaps there is a special term that I am unfamiliar with.
Likewise, I read over the article What's New in Visual Studio TFS 2012, since we are using VS2012. It appears to go over the changes that have occurred since the newest release.
How do I find my shelf items, so that I can continue working on them?
your question is answered under "Unshelving" on the page you referred to (Shelve and Unshelve Pending Changes). You click on unshelve and first step you do is finding your sehlveset. However please remember it works only if you shelved your changes before you lost your PC.
I got this resolved, but I did not like the way I found to do it.
In Team Explorer, I opened my last successful shelf item, did a Right-Click and selected View Shelfset Details:
From there, I went to each file listed in the Changes to Unshelf list.
I selected Open for that file, and then physically copied the text from that file to the corresponding file on my PC.
Again, I did this for each file that had changed in my Shelfset Details.
For whatever reason, Team Foundation Server does not pull that data back into my project whenever I select the "Unshelve Changes" option.

Paste screenshot into TFS 2010 Web access for bugs

Is there anyway to automatically paste screenshots into TFS 2010 Web access for bugs? I don't want to have to save the screenshots into files and then add them as an attachment. This takes a while to do this. I just want to quickly add them to the bug.
I don't think you can.
See this similar (possibly not identical) question on MSDN forums:
http://social.msdn.microsoft.com/Forums/en-US/tfsgeneral/thread/fe8b80c9-8fbd-4d6c-bc65-80d75dd3409b/
In response to:
Now, when adding the task into TFS 2010 , I can use the cupboard to “copy/Paste” from OneNote to TFS. But then the image is stored as a link to my local machine and not stored in TFS server.
The answer was (repeatedly stated):
As I said in my previous reply, we should to add the images as attachment into Work Items. Open Work Item in VS, click Attachments tab, then click Add to browse your images, the images will store in TFS Server.
Or, DIY and write an application
TFS exposes an API that you could use to create your own tool, rather than using their web access. See this question for how to implement that particular piece (adding attachments):
Upload a file using TFS Client APIs
In Visual Studio 2010 you can go to the Attachments Tab and paste your screenshot using CTRL-V.
An attachment called 'screenshot.png' will automatically be created.

TFS out of sync between local and remote - how to "re-sync"?

I have a Project on CodePlex which is using TFS and I am using the TFS Plugin for Visual Studio. Now I have copied this project and worked on another PC without TFS and done some refactoring. Foolishly, I have then just used copy/paste and manual text editing to merge my changes, expecting that TFS just picks up the changes.
Apparantly, that is not the case.
Here is a screenshot of my local directory:
My Local TFS http://img259.imageshack.us/img259/2897/tfslocal.jpg
Notice how some files are missing the lock symbol - those are missing. If you look at the current TFS Tree on Codeplex, there are some files which do not exist locally anymore, i.e. WikiPlexExtensions.cs in the main folder.
Is there any way to easily tell TFS to compare my local to the remote repository and pick up the changes? I could re-add the local files using "Exclude from local project" and re-adding them, and I could create the "deleted" files as empty files just to delete them, but if I can avoid the manual messing around that would be good as well :)
The easiest way is to exploit VS 2008's "online" feature. Basically you want to set your solution offline, then bring it online while connected to the proper Codeplex server. TFS should figure out the rest.
Feature overview: http://msdn.microsoft.com/en-us/teamsystem/bb898913.aspx
Tweaking the settings by hand: http://blogs.msdn.com/benryan/archive/2008/07/09/using-tfs-2008-power-tools-to-modify-server-s-offline-state.aspx
To compare local and server folders, you can check out TFS Power Tool. After installing it, you can bring up the source control explorer, right click on the server folder and then select 'Compare'. Folder difference window will display the differences. You can also right click on the differences to see available commands such as 'Get Latest' to update your local folder for example. Check out Bryan Harry's blog post on the power tool
I don't think there is an easy fix... What I've done in the past is back up those files that I have edited, then do a "Get Latest Version..." for the files I edited. This should change the files back to being read-only etc... Now, check out the files the regular way and paste the backups you had into the checked out files. Obviously this really only works when there are a couple of files you have edited.
TFS (in Visual Studio) has a "Reconcile" command for this, see Microsoft documentation, or this answer with steps.
BTW: This command may not haven been existing at time of original question, but this question came first when I was searching.

Resources