microsoft / DockerTools

Tools For Docker, including Visual Studio Provisioning and Publishing
Other
173 stars 26 forks source link

VS2022 Failed to Create Certificate #384

Closed adminnz closed 1 year ago

adminnz commented 1 year ago

I have Visual Studio 2022 Professional and Docker Desktop v4.19.0 (106363).

I am doing File -> new ASP.NET Core Web App project and have the following settings configured. image Then add Container Orchestrator Support to the WebApplication1 project.

Then select Docker Compose as the debug profile and then attempt to debug the application.

I get the following error: image

It says to look at the Container Tools output but there are no errors:

docker exec -i 3796991df0c9 /bin/sh -c "if PID=$(pidof dotnet); then kill $PID; fi"
========== Debugging ==========
docker ps --filter "status=running" --filter "label=com.docker.compose.service" --filter "name=^/WebApplication1$" --format {{.ID}} -n 1
3796991df0c9

What is strange is that from my understanding the usersecrets file of the project should have an entry for "Kestrel:Certificates:Development:Password". But mine is empty.

I have tried:

But nothing works. I can't even find out how to get more information about what the cause of the issue is.

NCarlsonMSFT commented 1 year ago

To generate a log file with potentially more information you can set the environment variable MS_VS_CONTAINERS_TOOLS_LOGGING_ENABLED to 'true'. The log file is created in %tmp%\Microsoft.VisualStudio.Containers.Tools

adminnz commented 1 year ago

I ended up having to reinstall windows for this bug to not happen.

an2ny commented 5 months ago

having this issue right now, what is weird is that it just popped up recently. any fix?