Budzique
Budzique
CC#
Created by Budzique on 3/20/2025 in #help
EnumerateFiles Blocks UI thread even in Task.Run()
I'm writing an application that needs to validate a user-given directory by searching for specific files in said directory. I'd like to run the validation in the background so the app doesn't freeze up. I've tried a few suggestions and still ended up here asking because it seems EnumerateFiles refuses to run on another thread. Following is a functional example as a .net8 WPF application.
11 replies