Filesharing not enabled. 'Volume sharing is not enabled. On the Settings screen in Docker Desktop' Error 125

I’ve been having this problem with docker for the past week on a new install:
Volume sharing is not enabled. On the Settings screen in Docker Desktop, click Shared Drives, and select the drive(s) containing your project files.

I tried everything… disable firewall, antivirus, new install, restore to default, add folder to docker…nothing works.
The file sharing option doesn’t show the directories shared by docker.

can someone help me with this?

Add C:\ or the specific drive (Z:, etc) to the File Sharing entry.

Due the fact i’m using Windows 10 and “WSL 2” instead of the old “Hyper-V” engine.
I only needed to Check the “Use the WSL 2 based engine” under “General” and did “Apply & Restart” that solved by issue.

in Docker Desktop, Settings–> Resources -->File Sharing → click on “+” icon and add your project file path, I mean the folder where your working project.

This could be because you have added some assembly to your project. Check your csproj file if it holds that dll reference as realitve location somewhere in your solution. Maybe you have it in some other place, so this file is not included in docker copy. Put it in the root folder and try.

I agree with samba439 - after you have done this, also close your Docker Desktop and open it again for Docker Desktop to recognize files have been added to the File Sharing list.