In .NET 5 the behaviour of the file extension search pattern changed from .NET Framework. See [EnumerateFiles](https://learn.microsoft.com/en-us/dotnet/api/system.io.directory.enumeratefiles?view=net-6.0), specifically the table entry `book.xls, book.xlsx | *.xls | book.xls | book.xls, book.xlsx` **To Reproduce** Steps to reproduce the behaviour: 1. Create files `a.txt` and `b.txt2` in a directory. 2. Run `Directory.EnumerateFiles(dir, "*.txt", SearchOption.AllDirectories)` 3. Compare .NET 5 or 6 behaviour to `MockDirectory` **Expected behaviour** Only `a.txt` should be returned. **Actual behaviour** Both `a.txt` and `b.txt2` are returned. Can also just use `*.t` as search pattern which should return no files in a folder of `.txt` files etc.