Visual Studio solution files with unix line-end crash explorer...
I’ve just had to deal with a situation where Windows 11 Explorer crashes and restarts every time I browse to a particular directory. The directory contained the source to my AFD code and I somehow managed to guess at the cause and fix the offending file…
The problem was that I had some Visual Studio sln files checked in to a git repository and at some point git had changed the line ends from windows \r\n to unix \n. I am assuming that there’s some horrendous bug in the Visual Studio shell extension that’s used for displaying icons for solution types based on their content… I’m pretty sure this is a new issue that was installed with a recent Visual Studio update as I haven’t had the problem before. I have the following versions of Visual Studio currently installed:
- Visual Studio Enterprise 2022 Preview - 17.11.0 Preview 2.0
- Visual Studio Enterprise 2022 - 17.10.2
- Visual Studio Enterprise 2019 - 16.11.37
- Visual Studio Enterprise 2017 - 15.9.63
I threw together a quick program that recursively scans for sln files and ‘fixes’ any with unix line ends and this prevents the explorer crash…
After some more investigation it seems that it’s the installation of “Visual Studio Enterprise 2022 Preview - 17.11.0 Preview 2.0” that adds this particularly troublesome feature. Removing the preview does not remove the problem…
It seems to be a week for my time being wasted by random Windows 11 crashes. It started with Tortoise SVN deciding to crash when attempting to check-in working copies that had lots of changes in them. I’ve yet to solve this particular issue. It doesn’t appear to be something new in Tortoise SVN, as I have reverted to an earlier version and see the same issue. Also it just suddenly started and wasn’t related to an update of tool itself. It could possibly be an issue with how Tortoise SVN interacts with a Windows API call that has changed, but it’s odd and annoying.