I have three Windows 10 computers I use for Arduino. I keep my Arduino libraries/user files directory in a OneDrive folder so that I can access the files from each of the computers. This has worked just fine until yesterday when I first used Arduino after a recent Microsoft Windows 10 update. Now, when I try to compile an Arduino file that is open in the IDE, I get the error " The system cannot find the file specified" where the file is open in the IDE. It does not matter which board is selected, and I am only compiling, not compiling and downloading. The file that cannot be found is either the .ino file being compiled or a library file (but only one file). The problem appeared on all three computers at the same time. The OneDrive files are kept all local to each PC, but synced across the three computers using the OneDrive. The recent Windows 10 update did make changes to the OneDrive system.
If I move the Arduino .ino file to a directory that is not on the OneDrive, the compile works fine.
I started with Arduino 1.6.9, and then updated to 1.8.5. No difference. All libraries and board drivers are up-to-date.
I really like keeping my Arduino working directory on the OneDrive so I can go back and forth on the computers and always have access to the latest version of the Arduino files.
If you do want to continue using the Arduino IDE with OneDrive, you may be interested to know that the bug has already been fixed in the beta build of the Arduino IDE, which you can download here:
but be aware that version of the Arduino IDE is primarily intended only for beta testing so you may have a higher chance of encountering bugs than you would using the production releases of the IDE.
To see details on the problem, steps that are being taken to fix it, and other possible workarounds that will allow you use the Arduino IDE with OneDrive, see: