All project Files get read only attribute after download from TFS 2010 - visual-studio-2010

I am using Team Foundation Server with VS 2010. I am facing a problem that when i am mapping a new folder to download the code from TFS, after download all the code, all files/folder in new folder get automatically read only attribute and i have to remove this attribute explicitly after it i am able to build the solution other wise it is giving me "Access denied" error. Is there any TFS setting which is making my project files as read only.

Not with TFS 2010, this is called "Local Workspaces" and is available from TFS 2012 onwards and works like Subversion.
What you are doing, by removing the Read Only flag, is fighting TFS. What you should do is perform a Checkout on the file before editing. If you are using Visual Studio to edit solutions/projects this will happen automatically providing you have your Solution and Project bindings setup. If you are editing files outside of Visual Studio, you can perform a checkout by:
Using Source Control Explorer in Visual Studio.
Using the Team Foundation Server Power Toys to install a Shell Extension into Windows so you can Right click.
Opening the file in Visual Studio and using it as a text editor.
Using the tf checkout command line.
By removing the read only flag, you are allowing yourself to edit the file, but not instructing TFS that you have changed it, so TFS won't know to check it in when the time comes. TFS doesn't scan you workspace for changes like Subversion.

Related

Repair TFS Server Workspace

I use a server workspace for my Visual Studio / TFS setup because our project far exceeds the 100,000 file recommended limit for local workspaces.
One of the drawbacks of a server workspace is that Visual Studio cannot automatically detect changes to files in the workspace if these changes have been made outside of Visual Studio.
If I believe there may be undetected changes lurking in my workspace, how can I tell Visual Studio to actively/explicitly check the integrity of the workspace. I.E. I need a "get" operation that assumes that zero pending changes may actually be incorrect.
There is a PowerTools command tfpt online which looks for files which have had their read-only attribute removed (if you were messing with them on the train home for example) but I guess you might have new files and need something like detected changes in local workspaces.
If you go into Source Control explorer you can right click your folder, select compare and then play around with what you need to compare the server to your local copy (file types, new files, different files etc)
TFPT Online:
http://blogs.msdn.com/b/buckh/archive/2005/11/16/power-toy-tfpt-exe.aspx
If you are using TFS 2013+ and Visual Studio 2013+ then you can use the "tf reconcile" command to analyse the differences.
https://msdn.microsoft.com/en-us/library/bb385984.aspx
The power tools "tfpt online" command has been depricated for some time.

How to remove a file from Visual Studio Online and its history

We are very new to using Visual Studio Online. After some discussion we have decided to not keep our web.config files in the cloud. It was easy enough to remove it from the project, however, the file still exists in the changesets and history. Is there a way to wipe it from the cloud either through the website or visual studio? We are using 2015. Thanks.
EDIT We are using Team Foundation Version Control.
Destroy Command (Team Foundation Version Control).
You need to destroy the file you want and then you will have to commit to save the changes. With this the file and it's entire history will be deleted. See if this helps.

Disable TFS support for a Visual Studio 2010 project/solution

I inherited a project at my new company that used to connect to a TFS server. Now I only have the zip of the source/solution which I have dumped into my Kiln (mercurial) repo.
The issue I am having is every time I open the solution I see this prompt
"Please provide credentials to connect to team foundation server"
If I hit cancel I see this...
Any ideas as to how to avoid this every time I open the solution?
You need to remove the binding to TFS from the inside your projects.
In Visual studio, with the projects loaded, open the file menu->source control->change source control->Unbind for all the projects.
This will remove a section of xml from your .csproj (or whatever type).
Save your projects and you should be free of TFS.

TFS will not accept changes I've made to a Java project

I am using TFS's Team Explorer to manage Visual Studio projects.
Recently, I've created a new Java project (not in Visual Studio) which I manually added to TFS using the Source Control Control explorer in Visual Studio.
After I added the Java project to TFS, I made some changes and bug fixes. Then, I went into Visual Studio and opened the Source Control Explorer to check in my changes, but TFS thinks that no changes were made.
It seems that I needed to check out the project before making changes. I guess I erroneously expected TFS to track that automatically, but okay.
So, using the Source Control Explorer in TFS, I checked out the project, and then I tried to check in pending changes. When I tried to check in, I got the following message:
All of the changes were either unmodified files or locks.
The changes have been undone by the server.
Is there a way to convince the server that indeed my project has changed? How can I check in the changes that I have made?
Thank you for any help.

TFS - Checkout File from Outside Visual Studio - Offline Mode

i have used TF.exe (Team Foundation Client) to checkout files from outside with the following command.
http://blogs.msdn.com/b/noahc/archive/2007/01/22/real-tfs-command-line-help.aspx
tf checkout $project/filename
but, i need to checkout from outside when TFS server is also not reachable. In visual studio, it prompts us to work offline and then later on, it sync automatically with the changes into server when it goes online. How do i acheive the same from tf.exe or any other way to do it.
PS: i do have real requirement of editing some files which is not belongs solution files which gets modified from outside of visual studio. as of now,i am using tf checkout method to checkout the file from outside. but, this require connection TFS server all the time.
You can't do this with the command-line tools, because the offline mode is a feature of Visual Studio, not of TFS.
The tools always work directly with the TFS, so it must be online and reachable at that time.
Amendment regarding your P.S.: What Visual Studio does in Offline mode is just setting the local files to writable and "remembering" with which files it did that. Then, on going online again, it checks for any changes in the meantime. If there were any, it starts a merge process, if there weren't, it checks out the file without getting it.
There's no reason why you couldn't do this same process by hand, it's just more comfortable through VS.
BTW: Why not have a Solution for this "dangling files"? Just create an emtpy solution and add them as Solution Items. This way you can use the VS offline mode.

Resources