Reformatting web.config

Topics: General
May 1, 2012 at 1:07 PM



When installing packages my web.config file will be reformatted. the indentation will be reset to 2 spaces (instead of tabs) and lines will be wrapped.

This makes finding what changed incredibly difficult. It's not version control friendly.

Most of the time it's new binding redirect, or just a version number in a binding redirect, but sometimes (as with jQuery) it's ABSOLUTELY NOTHING!


a) if you're not going to change anything, leave it alone!

b) if you're just going to poke a value into an attribute, do just that! there's no need to reformat the whole document just to change an attribute!

c) if you're going to add new elements, only format those new elements. not the whole document! (it would be great if you can maintain the existing indentation style, but not critical)