Debugging .NET Core Application in the Docker container using Visual Studio

Viewed 75

I am trying to set up a development environment entirely using docker containers so that I don't have to install dependencies on the developer machines. Is there a way to use visual studio (not visual studio code) to debug .net core application that is running in the container?

Steps I Followed

  1. I created an image that has all the dependencies like SDKs and packages in it.
  2. I am mounting the code using volumes into the container so that I can make changes to the code that is on the host machine. (I am also doing "watch" to restart the app when changes are detected).

Desired Behaviour

Because the dependencies are inside the container, the visual studio is not able to detect those dependencies (it shows red squiggly lines in the code). How do I make the visual studio linter detect those dependencies?

0 Answers
Related