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

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.

Related

What's the use of binding in TFS

I got the latest version of a Visual Studio solution on TFS. But when I try to open the solution in Visual Studio I get the following message:
Source Control
The solution you have opened is under source control but not currently configured for integrated source control in Visual Studio. Would you like to bind this solution to source control now?
Asking my colleague, I found out that he's been checking in the changes through Visual Studio without any problem.
Here's my question: Considering the fact that I can still check in my changes via IDE, what is the use of binding a Visual Studio solution or project to TFS (or more generally source control)? Except that "lock"/"red tick" icon appearing beside them in Solution Explorer.
Adding Solutions and Projects to Source Control: When you add a solution to source control, the solution becomes part of a dynamic versioning archive created and maintained by the source control provider. Each time someone checks in a new version of the solution, that version becomes part of the archive and is available to other source control users.
According to the warning message, It seems that you are opening from source control a solution that was incorrectly added to source control (it's missing some bindings strings that should have been in the sln or project files). You should click the button yes and Bind the projects correctly to their server location, then OK the dialog. The server file will be checked out and modified locally. You should checkin the changes after that.

TFS 2010: Project file gets deleted on Get Latest Version

We have a standard installation of TFS 2010 with a handful of developers. We do have a number of projects with a number of branches but nothing to crazy. Frequently we will go to get the latest version of a solution and TFS will delete the project file (csproj) of one of the projects, a MVC 3 web project. Looking at the Source Control logs we see the following error:
One or more source control bindings for this solution are not valid and are listed below.
Source control bindings can be modified by selecting File, Source Control, Change Source Control from the main menu.
If we go into the pending changes view and undo the deleting of the project file everything works fine. Does anyone know what the error message means and know what it is that we are doing that is causing it?
Environment:
TFS 2010
VS 2012
SQL Server 2008

TFS automatically checks out a project when loaded

This is very weird behavior of Visual studio and TFS. I am using Visual Studio 2012 and TFS 2012. We have a large number of projects and solutions in the source control.
Lets assume I have no pending changes.
Whenever I open solutions which are present on source control all projects are loaded. And not a single project is checked-out for edit. I can see lock icon with the projects in the solution explorer.
Now I create a new solution and add projects from the source control to this solution, I face weird behavior. Some of the projects are automatically checked out and I haven't did any change to it. And this happens to only few projects instead of all projects. If I call undo all pending changes TFS perform a undo but then calls checkout for the project.
What is the proper solution to it. And it happens only in custom solution (sln) which is not present in the source control.

All project Files get read only attribute after download from TFS 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.

Roll back a change with Team Foundation Server Source Control

I'm having a real hard time rolling back a change under TFS Source Control. I've followed the instructions in MSDN with no success.
The instructions basically go like this:
Get the old version for source control (files get copied to local workspace)
Check out the local version
Check in
The problem is that when checking out, the latest version is automatically fetched from source control, overwriting the specific version I was trying to revert to.
That same MSDN article has a comment on it pointing to the same fact, and there seems to be a setting for that, which can be changed in two places:
In the TFS project settings (rightclick the project in Team Explorer -> Team Project Settings -> Source Control):
A Visual Studio Setting (Tools -> Options -> Source Control -> Visual Studio Team Foundation Server):
As you can see, both of them are disabled, but I'm still getting the latest version whenever I do a check out, making it impossible to do a rollback.
Is there any other setting I'm missing? Or this isn't the correct way of doing a rollback?
NOTE: Using Visual Studio 2010
Since you 're on VStudio2010 - you can probably forget about that MSDN article. Instead, download & install latest TFS Power Tools, they do come with a nice graphical "Rollback":You can also check tf rollback.

Resources