Hi @Þór Sigurðsson ,
Welcome to Microsoft Q&A forum.
I noticed that you mentioned that the directory is writable, did you check the corresponding permissions by right-clicking the "My Exported Templates" folder(and its parent folders) => Properties => General tab => Attributes: Read-only (Only applies to files in folder), and switching to Security tab => select the corresponding user => Edit => make sure that the permissions have been correctly assigned(especially for Write permission)?


If so, I think you can try to launch VS as administrator and test to export the project template again. Maybe this issue is caused by some limitations about the accounts.
If you try to delete the "My Exported Templates" folder manually, and then create a same folder, name it My Exported Templates, will it work?
I also suggest try to reboot your machine and reconnect to your OneDrive, see if it works.
Besides, can VS successfully create a new project in your OneDrive directory?
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.