I'm facing issue to remove full directory because some file get this error System.UnauthorizedAccessException: 'Access to the path 'pstore.bin' is denied.'
I've tried to give permission to single File but same, tested this but doesn't work too:
var di = new DirectoryInfo(item);
di.Attributes &= ~FileAttributes.Normal;
Directory.Delete(item, true);
Not sure how I can remove this file, I've tested almost everything I found on this forum, and not sure what is wrong. To be clear this file is from Android Studio AVD Emulator.
Updating exception notes:
**System.UnauthorizedAccessException: 'Access to the path 'pstore.bin' is denied.'**
This exception was originally thrown at this call stack:
[External Code]
TwitterSuite_v._1._0.Form1.fullZipAll.AnonymousMethod__0(string) in Form1.cs
[External Code]