I'm working with TFS 2010 and I need to edit a file localy without checking it out. I want to be able to edit the file in VS2010, is this possible?
Then, right-click on the project and choose Edit <projectname>. You don't have to use solutions or projects in Visual Studio to edit, build, and debug code. You can simply open the folder that contains your source files in Visual Studio and start editing.
Right-click on your project in solution explorer and select Unload Project. Right-click on the project (tagged as unavailable in solution explorer) and click "Edit yourproj. csproj". This will open up your CSPROJ file for editing.
While having opened the Visual Studio with your project, go in File Explorer to the RC file in your project, right click and open with Visual Studio 2017. The RC file will be opened in the curent project and everything will work like a charm.
The defective "Save as" dialog Rossini refers to above is a known bug in VS 2010, with the official response being "Won't fix"
https://connect.microsoft.com/VisualStudio/feedback/details/765219/tfs2010-save-as-dialogue-does-not-overwrite-an-un-checked-out-file-when-solution-is-open#
This effectively makes it so you cannot use "Edit: Do Nothing" and removing the read-only attribute as a way to work with single files offline without a check-out. So from all the work I have done the answer to this question is "you cannot", at least not in any effective way.
The alternatives (none of which are reasonable, usable, or accomplish what you want in scratchpad file editing) are to take your whole solution offline or only load the file directly in a separate instance of Visual Studio (that is, outside of the Solution), at which point you lose a bunch of references and Intellisense and might as well use Notepad++.
I just wanted to get this final information out for those (like me) who have searched for a way to do this. The last time I checked this was still broken in VS 2012 as well.
[Edit] I have not looked at any of the plugins or addons mentioned, only off-the-shelf Visual Studio.
You can edit a local file in Visual Studio without checking it out by remove the read-only attribute on the file (DOS command: attrib -r). The editable file will not show up in your workspace's pending changes.
Leaving a lot of editable (writable in TFS-term) files in your local workspace will increase the number of merge conflicts when you do a get latest, and someone else has changed these files. You can search for these editable but not checked out files in your local workspace using the TFS command line power tool: "tfpt.exe online".
More information on the tfpt commands can be found here.
You can tell VS / TFS not to check out on edit, Tools / Options / Source Control / Environment
Change Saving to "Prompt for checkout" and Editing to "Do nothing".
Yes. Get the file and then disconnect from TFS (Work Offline). You will not check out the file.
Or just edit the file and do not check it in. Undo the changes and the file will never be checked-in.
I believe you are looking for this:
Edit your VS options like this:
Edit your file and click Save. At this point, you'll get a warning dialog like this:
Hit Ok and then modify the file's read-only attribute and then save again. This will allow you to save your edits without checking out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With