Troubleshoot Visual Studio 2017 development with Docker
When you're working with Visual Studio Tools for Docker, you may encounter issues while building or debugging your application. Below are some common troubleshooting steps.
Volume sharing is not enabled. Enable volume sharing in the Docker CE for Windows settings (Linux containers only)
To resolve this issue:
- Right-click Docker for Windows in the notification area, and then select Settings.
- Select Shared Drives and share the system drive along with the drive where the project resides.
If files appear shared, you may still need to click the "Reset credentials..." link at the bottom of the dialog in order to re-enable volume sharing. To continue after you reset credentials, you might have to restart Visual Studio.
When using Docker for macOS, you might encounter an error referencing the folder /usr/local/share/dotnet/sdk/NuGetFallbackFolder. Add the folder to the File Sharing tab in Docker.
Unable to start debugging
One reason could be related to having stale debugging components in your user profile folder. Execute the following commands to remove these folders so that the latest debugging components are downloaded on the next debug session.
- del %userprofile%\vsdbg
- del %userprofile%\onecoremsvsmon
Errors specific to networking when debugging your application
Try executing the script downloadable from Cleanup Container Host Networking, which will refresh the network-related components on your host machine.
Microsoft/DockerTools GitHub repo
For any other issues you encounter, see Microsoft/DockerTools issues.