Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to compare two files in visual studio ignoring casing

I want to compare two files in visual studio (files containing stored procs) So I want to ignore all the "Capital" / "Small" differences in the file.

I opened the command window and used Tools.DiffFiles but its taking the case difference also into consideration

P.S I have already seen this question and answers for it

like image 982
Vignesh Subramanian Avatar asked Feb 16 '15 10:02

Vignesh Subramanian


People also ask

Can I compare 2 files in Visual Studio?

locate the required file in the Solution Explorer window, right-click it and choose Compare Selected File in the context menu; open the required file in Visual Studio, right-click the required document name in the document tab well and in the document's context menu select Compare Current File.

How do I compare the contents of two files in Visual Studio code?

Compare selected filesSelect two files in Solution Explorer and right-click to bring up the context menu. Then select Selected Files to see them side-by-side in the diff view.

How do I compare two projects in Visual Studio?

Even if you're not using version control, you can use the Diff window in Visual Studio to compare two files. To open the Diff window directly in Visual Studio, you can use the devenv.exe tool with the /diff option from the Developer Command Prompt to compare any two files on your computer.

Can we compare two files in VS Code?

VS Code actually is a good tool for comparison, Open VS Code with the files you are going to compare. Right-Click one file you want to compare => Select for Compare.


1 Answers

Although Visual Studio is asked for explicitly, I recommend a different tool: WinMerge.

It indeed has many options for comparing and merging files. It lacks a 3-way-merge though. Of course WinMerge can optionally ignore case.

Visual Studio can be configured so you can call WinMerge using "Tools / External Tools ...". Then you may even install a toolbar item for it. Quite nice!

Most version control systems allow you to use WinMerge as a compare tool. For example for TFS you open the "Tools / Options ..." menu and there you choose "Source Control / Visual Studio Team Foundation Server". Click on the button "Configure User Tools".

like image 83
TobiMcNamobi Avatar answered Oct 09 '22 21:10

TobiMcNamobi