Share via

How to setup Onedrive to simply IGNORE specific subfolders buried in Visual Studio project folders.

Geoff Verge 0 Reputation points
2026-02-19T00:09:05.6766667+00:00

In my VS environment I cannot move the ...\bin and ...\obj subfolders in my projects. These are buried down in my Documents folder. Way too often when I try to compile or clean my project, I get countless errors due to Ondrive Sync! How can I tell Onedrive to IGNORE these individual subfolders - DO NOT SYNC - under the Documents folder, so it does not attempt a sync operation within the subfolders even when new files exists??? These are subfolder that are controlled by VS, and are alway temporary in nature!
I have tried all of the solutions provided by the Microsoft support and Q & A and have yet to be able to do this, without writing C# script in line with compiler to deal with broken default VS pathing. It pretty much renders Onedrive useless on development machines!

Microsoft 365 and Office | OneDrive | For home | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. EmilyS_726 14,780 Reputation points Volunteer Moderator
    2026-02-19T01:46:06.7666667+00:00

    Hello

    Unfortunately the answer is no. Currently OneDrive syncs either the entire documents folder, or not at all.

    If you need to keep those folders on local path, consider doing this:

    Right click on the Documents folder and choose always keep on this device, give it time. Wait til all files and folders turn to the solid green with white check mark inside.

    Go to OneDrive settings > Sync & Backup tab > Manage backup, turn off documents folder. Restart the computer.

    Then Go to Files Explorer, go to OneDrive folder. In OneDrive folder, create a folder of whatever name that makes sense to you. Then manually move whatever other files in the Documents folder that you want to sync to OneDrive into this new folder you created. Basically, moving forward, if you want anything sync to OneDrive, you need to make sure you save them inside the OneDrive folder, not in the Documents folder.

    0 comments No comments

  2. Q&A Assist
    2026-02-19T00:10:45.95+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To prevent OneDrive from syncing specific subfolders, such as the bin and obj folders in your Visual Studio projects, you can use the Group Policy settings or the SharePoint admin center to block certain file types or folders from being uploaded. However, OneDrive does not allow you to selectively sync individual subfolders within a folder structure directly.

    Here are the steps you can take:

    1. Use Group Policy: If you have access to Group Policy, you can configure it to exclude specific kinds of files from being uploaded. This can be done using the policy EnableODIgnoreListFromGPO for Windows.
    2. SharePoint Admin Center: If you are using OneDrive for business, you can also configure settings in the SharePoint admin center to block syncing of specific file types.

    Unfortunately, there is no straightforward way to ignore specific subfolders without affecting the entire folder structure. If you need to keep those folders out of sync, consider moving them to a different location outside of OneDrive's sync scope or using symlinks to manage your files more effectively.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.