When trying to run the viewer pane on text files, I am starting to see this error now:
First part of the details shown in that dialog is:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'System.IO.Abstractions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=96bf224d23c43e59'. The system cannot find the file specified.
File name: 'System.IO.Abstractions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=96bf224d23c43e59'
at Microsoft.PowerToys.Settings.UI.Library.SettingsUtils..ctor()
at Microsoft.PowerToys.PreviewHandler.Monaco.Settings..cctor()
I suspect this isn't Directory Opus, but am not sure what to do about it either way. It looks like something from PowerToys is being used? I have PowerToys installed, but not sure why it be acting as a viewer. Can I go back to some default? I haven't changed anything that I am aware of.
I have PowerToys installed and can preview a .txt file just fine. Is the text file that's causing you problems a file with a .txt extension or something else?
Does the same file result in a similar error in File Explorer’s viewer pane?
The error box isn’t one that comes from Opus, so it’s likely a problem with a viewer something has installed.
Edit: Last two lines of the details show it’s coming from PowerToys (and their Monaco text viewer, specifically). Disable or uninstall that and the problem should go away.
PowerToys does not seem very stable or tested these days.
That was it. I opened PowerToys as admin and disabled the File Explorer add-ons. Now the behaviour has gone back to the default viewer, which works nicely.