Everytime I run flutter clean I get this error :
C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter>flutter clean
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\.dart_tool. A program may
still be using a file in the directory or the directory itself. To find and stop such a program, see:
https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used
Deleting .dart_tool... 14ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\ios\Flutter\ephemeral. A
program may still be using a file in the directory or the directory itself. To find and stop such a program, see:
https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used
Deleting ephemeral... 5ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\linux\flutter\ephemeral. A
program may still be using a file in the directory or the directory itself. To find and stop such a program, see:
https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used
Deleting ephemeral... 7ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\macos\Flutter\ephemeral. A
program may still be using a file in the directory or the directory itself. To find and stop such a program, see:
https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used
Deleting ephemeral... 4ms
Failed to remove C:\Users\salil\OneDrive\Documents\MEGA\Practicals\Flutter\myfirstflutter\windows\flutter\ephemeral. A
program may still be using a file in the directory or the directory itself. To find and stop such a program, see:
https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used
Deleting ephemeral... 6ms
I tried ProcessExplorer, File LockSmith and ResourceMonitor to find out which process might be using those directories. There is no process that is locking that folder. Restarted the laptop. Most post suggested either dashes or spaces in the folder name might be the problem but as you can see there is none. The only thing that works is going and deleting each one of those folders manually. The only thing that I can think about is that OneDrive might be interfering but not sure. Please help.
C:\Users\salil\source- this is the path that Visual Studio uses by default.