Description
Seems that in some circumstances, the XDT transforms used upon package install/uninstall can leave inconsistent
line endings in the config file which results in a dialog being popped up by VS which isn't a great experience. Especially
since that dialog doesn't give much insight into why the line endings are inconsistent. (The scenario is when there are
multi-line comments in the config file btw.)
When we write to the config file with our install.ps1 script, it re-normalizes all the line endings so there isn't any warning
upon install. But when uninstalling (upgrading too?) our uninstall.ps1 runs first and the XDT after, so we can't inadvertently
fix the issue.
One approach could be to abandon our XDT's entirely and do that work in our .ps1 scripts. That might be more fragile
though, and I'm not sure this crops up often enough or meets the annoying-enough threshold for that risk.
The other thing to consider here is that neither XDT transforms nor un/install.ps1 scripts are supported in packageReference
projects, so I'm not inclined to spend lots of resources to fix a scenario that is increasingly not recommended. (I don't know
that there is a good strategy for handling these projects though. Running a build task to transform config if it does not see
providers registered already? That doesn't help discoverability for anyone who wants to customize any settings. And it doesn't
help us with a path to migrate previous customizations forward if any options change between versions. It's really a sad
story that we have to put this burden on the developer when then install our package in packageReference projects... but
I don't know that I want to make it even more confusing by half-handedly doing some default things sometimes in a
non-obvious behind-the-scenes sort of way.)