Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker toolbox with Visual studio - Volume sharing is not enabled

I'm trying to get running a docker support with Visual studio 2017 for a .net core 2.0 web app running on linux containers. I'm working on machine with win 7 OS, so I must use a Docker toolbox with Virtual box. I've already checked this question: How to get docker toolbox to work with .net core 2.0 project, but I got stuck in the following problem, when trying to run it with VS:

Volume sharing is not enabled. Enable volume sharing in the docker ce for windows settings

So far I know that there is a default volume mounted under the C:\Users, so my project files should be copied somewhere under this folder in case I don't want to mount any other volume. So I copied them there.

When I check the settings of my Virtual box, folder seems to be shared:

Virtual box settings.

I can even cd into this folder with command line, but still can't get over this problem. Any ideas about this?

like image 795
Jan Muncinsky Avatar asked Mar 06 '23 08:03

Jan Muncinsky


1 Answers

Finally I got this running. Error message comming from VS is very misleading and it has nothing to do with volume sharing. Eventually I realized that problem is in running a debugger, because when I ran solution with Ctrl + F5 everything was ok and container started correctly. Problem occurred only when running with F5 and trying to attach a debugger.

Then I found some clues in console output. VS tries to download some tooling for debugging containers with powershell script named GetVsDbg.ps1. When running this script I could observe errors like:

Add-Type : Cannot add type. The assembly 'System.IO.Compression.FileSystem' could not be found.

Finally I fixed this issue by updating powershell version which was somehow in collision with my .net framework installed on my machine.

like image 134
Jan Muncinsky Avatar answered Apr 09 '23 04:04

Jan Muncinsky