17

When using Visual Studio, select a pending change to a .sql file. Select "Compare with Latest" or "Compare with Workspace Version." The file opens in the Diff Window.

Is there any way to be able to edit the .sql file in the Diff Window? This functionality is available when comparing other file types.

HaveSpacesuit
  • 3,572
  • 6
  • 40
  • 59
Rawle
  • 199
  • 12
  • I have searched and searched for how to allow .sql files to be edited in the diff view also and have not found the answer. I am hoping someone knows. – Ross Bradbury Aug 30 '14 at 02:00
  • You can use 3rd party file comparing softwares such as *beyond compare* with VS and TFS – Pratik Gaikwad Aug 16 '17 at 16:21
  • That is a good work around, but I'm hoping for a solution which can work inside Visual Studio. – HaveSpacesuit Aug 16 '17 at 17:11
  • Here is a case where a file couldn't be edited in the diff view, and it also sounds like it couldn't be edited at all: https://stackoverflow.com/questions/14335052/under-what-conditions-will-the-visual-studio-2012-difference-viewer-allowing-edi – Scott Newson Aug 21 '17 at 18:36

2 Answers2

11

What you want is not currently possible. This link from the Visual Studio Developer Community says:

We have determined that this issue will not be addressed in the upcoming release. We will continue to evaluate it for future releases.

You can vote on the issue at the link and get status updates from Microsoft if it changes.

  • Link is dead now – Shiv Aug 24 '22 at 23:02
  • The duplicates are also closed citing probably same link which is dead. Their change tracking processes need some work. This is still a problem and they just 404'd it. – Shiv Aug 24 '22 at 23:08
  • I believe this is the latest url for the link that OmletsForBreakfast shared: https://developercommunity.visualstudio.com/t/WFR-Some-files-are-not-editable-when-u/396873?space=8&stateGroup=active&ftype=idea&sort=newest&scope=follow – Alex Eisenhart Nov 15 '22 at 00:15
0

It looks like this issue was fixed 5 days ago! https://developercommunity.visualstudio.com/t/WFR-Some-files-are-not-editable-when-u/396873?space=8&stateGroup=active&ftype=idea&sort=newest&scope=follow

The documented solution is to upgrade to Visual Studio 2022 version 17.4. I ran into this issue today on VS 2022 ver 17.1.0. I just finished upgrading to 17.4.0 and I can confirm that the problem is now gone!

...in other words, I can now click "Compare with unmodified" on a .SQL file and then edit the right pane (the file on disk).