Visual Studio 2022 Docker v24.0.2 Ports error Docker Compose (Failed to load) The project system cannot open the file.
Visual Studio 2022 Docker v24.0.2 Docker Compose Ports Error (Failed to Load) The project system cannot open the file.
Hello. I think I followed all the instructions and managed to get an API in one container and an MSQL version with an additional base in another and run them together with Docker Compose. So I'm happy. The problem (there is always a problem) Well, actually there are three problems and they are the following:
The first is that when I press the docker compose button in Visual Studio 2022 in debug mode, the swagger api is triggered and if I run an endpoint, the api connects to the other container's database with no issues. But if I want to do it in Release mode, the swagger appears but does not connect to the database.
The second problem is when running in Release mode, I can see the container group running but the API doesn't show up on the same port as in Debug mode, which in my case is https://localhost:59566/swagger/ index. html. The same thing happens if I first modify the docker-compose.yml file, changing the image name to the same image but it's in docker hub and remove the build instructions and run docker-compose up -d, the API doesn't show up on https://localhost:59566/swagger/index.html or any other port that appears in Docker Desktop.
And finally, when I copy the whole project to another computer, (I create a zip that includes everything) and unzip it on the new computer. When I open VS2022, it says in the project Docker Compose (Failed to load) And below that message it says: The project system cannot open the file.
Thank you in advance for your help.