3

I have been tasked with maintaining a Nuget package for a project. In transferring the source files to the package, I need to append a ".pp" file extension to each file so that they can be transformed according to some variables within the file (pp is "project properties").

On an ongoing basis, the simplest way to do this would be to diff the Nuget content folder and the current source code folder. The problem with this approach is that Beyond Compare, as far as I can tell, can't compare basecontroller.cs and basecontroller.cs.pp. I can compare them manually by specifying the filename on the right, but when you're dealing with thousands of files, this is a very tedious process.

Is there some way I can tell BC "on the right-hand side, ignore the pp extension when resolving filenames for comparison"? Or "On the left-hand side, append pp when resolving filenames for comparison"? Or something else that achieves this same result?

1 Answer 1

4

As is so often the case, I found the answer myself five minutes after asking publicly about it :).

The answer is a feature called "Alignment Overrides". This is reached by:

  1. Session...Session Settings
  2. Misc tab (this is only available in a Folder Comparison project)
  3. Enter a series of Alignment Overrides.

In my case, the Alignment overrides I needed to enter were as follows:

  • *.cs.pp => *.cs
  • *.cshtml.pp => *.cshtml
  • *.asax.cs.pp => *.asax.cs
  • *.asax.pp => *.asax

Once I did this, it worked perfectly.

2
  • 1
    For a simpler case (.cs on the left, .pp on the right), you can also check Align filenames with different extensions in the Comparison tab of Session > Session Settings. Commented Nov 8, 2017 at 22:47
  • If you just need it once, you can right-click the left file, choose 'Compare to...' and then click the file to the right
    – PieBie
    Commented Jul 18, 2019 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .