XamlStyler
XamlStyler copied to clipboard
Normalize paths before attempting to find external config file
Description:
Fixes #308
The problem was caused by the paths being passed in from Rider sometimes having differing separator chars, e.g.
C:\example\path\app.sln vs. C:/example/path/app/views/mainwindow.xaml
This would cause XamlStyler to only check the directory where the file being formatted is located for an external config file, since no part of the two paths are matching.
Checklist:
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] I have tested my changes by running the extension in VS2017
- [ ] I have tested my changes by running the extension in VS2019
- [ ] I have tested my changes by running the extension in VS2022
- [x] I have tested my changes by running the extension in Rider
- [x] If changes to the documentation are needed, I have noted this in the description above