I am working on a Visual Studio 2008 project that is already added to TFS server. I am not sure which settings and policies have been configured for the TFS (this is done by a separate dept, not developers)

Every time I make an edit to a code file , the file is checked out automatically (without explicitly checking out the code file myself)

Please help me locate this setting or policy because it is not very useful at the moment. Sometime you want to make a local change to try out something, and not necessarily check out the code....


You can make a shelveset of the code allowing you to make a change to the code without affecting the rest of the development.

You can do this by right clicking on the file and selecting shelve pending changes.

+9  A: 

It is in Options\SourceCOntrol\Environment


+2  A: 

Unfortunately, with TFS it puts read-only locks on your files to PREVENT you from editing the file without checking it out first.

I cannot stand this decision. What you'll have to do is allow TFS to check out the file, then "Undo checkout" on it later if you don't want to check it out.

Make sure you have shared checkout enabled, exclusively locking files is the path to madness. ;)

Ben Scheirman
actually I have been doing exactly the same as you have explained. I suppose it is because we came from the background of VSS which allowed us to edit without checking out first.Now we have to change the tradition :)Well spoted and thanks anyway.
J Angwenyi
  • Close your solution.

  • Unplug your network cable.

  • Open your solution.

  • Visual Studio will tell you that TFS is not available and will open the solution "Offline".

  • Plug your network cable back in. VS should not take the solution "Online" until you explicitly ask it to.

  • You can then make any changes you like. When you attempt to save files it will tell you they are readonly - just overwrite them.

  • If you decide you want to check them in, take the solution Online by right-clicking it in the Solution Explorer.

  • Otherwise, just delete the local copy of the source when you're through with it.

Daniel Earwicker

I think this is a feature not a problem. If you change a module and it's under source control, you are now "out of sync" with the repository. If you exit (and the default behavior is to save) - and come back later - the file is not what everyone else is seeing. This can be dangerous.

For example: back in the days of VSS - on a Friday afternoon I had to "put out a fire" and debug a problem in, Prod Environment, so I changed the connection string in the appropriate config file. Another developer had the file checked out - so I did the usual workaround to mark the file read-only so I could save it. I figured out the problem and informed the user. This was in fire-fighting mode - so I didn't consider the fact that I now have production connection string in my dev configuration.

Monday mornign I come in and open up the solution. Is there any feedback telling me the config file is pointing to production? No I have to remember.

If the file is checked-out however - that icon is indicator to me that "flags" the fact that the files have been modified. I don't quite understand the "big deal" in having to right-click the solution and say "un-do pending changes"

Or if you want to save them, as the down-voted suggestion by aleichtle.wordpress (I don't understand the down votes - I think it is an excellent suggestion) explains, you can shelve the changes. This will remove the check-out and also save the changes on the server.

Version Control systems are a critical and important component of the software development life cycle. It is important to consider your "process". You may need to make adjustments as you use a different tool ("When in Rome"....)

It may be difficult to make the adjustment - but there are often good reasons the tool works the way it does.

While TFS showing you that the file is modified is very useful, the point is that SVN (and every other thing except for VSS) will show you this exact same modification without you having to remember to check in our out anything, it will just diff the file!
Orion Edwards

how to checkout code from tfs? i want that the files that to checkout should have all permissions set


you can remove binding to source control from file menu