I'm using Visual Studio 2013 and tfs 2013. Sometimes I'll make a code change and click compare with latest version. The diff tool will open and allows me to edit the file in the diff tool. However other times it will not let me edit but will read only.
Is there some setting or something I need to do for me always allow edit?
In a database project I've noticed that it never lets me edit in the diff tool. Is there some setting I need to change?
I've searched around online but haven't found any answers to this. Thank you.
Editing in the Diff viewer is only allowed for certain file types. It doesn't support editing .sql files and there is no VS setting to allow that.
Have you tried other diff tools like WinMerge or Beyond Compare?
In Visual Studio, go
Tools-->Options-->Visual Studio Team Foundation Server-->Configure User Tools,
add the extensions of the file types you would like to compare and under Command,
input the path of the diff tool (in my case it is Beyond Compare)
Other answers are correct as well but do not cover all the cases.
Visual studio will not allow you to edit file during compare if the panel you are trying to edit does not correspond directly to the file in your working directory.
You can easily tell by the address bar on top of the compare panel. If it ends with HEAD or Index - you will not be able to edit the file.
来源:https://stackoverflow.com/questions/30046067/visual-studio-diff-tool-when-is-editing-allowed