-
Notifications
You must be signed in to change notification settings - Fork 1.7k
dotnet publish get SSL error in WSL 1 #6714
Description
I also report the problem to .Net team
https://developercommunity.visualstudio.com/t/dotnet-publish-get-SSL-error-in-WSL1/1379035
Environment
Windows build number: 10.0.18363.1440
Your Distribution version: Debian 10 or Ubuntu 20.04
Whether the issue is on WSL 2 and/or WSL 1: WSL 1
Steps to reproduce
I install the fresh new Ubuntu 20.04 from Microsoft store and follow the instruction on dotnet documentation.
https://docs.microsoft.com/zh-cn/dotnet/core/install/linux-ubuntu#2004-
Then use
dotnet new console -o test
cd test
dotnet publish -r win-x64
which gives me the error
WSL logs:
Expected behavior

I got the expected behavior from another installation of Ubuntu 20.04 but in WSL 2 and also in a Ubuntu on my machine natively.
Actual behavior

I also try this with Debian 10 in the Microsoft Store which gives me the same output.
I first thought it may be my network problem, but after I got right behavior on my native Ubuntu installation, I thought it should be some problem with WSL. And I then change this WSL1 Ubuntu to WSL2. Everything works fine.

Another interesting finding is that when I export the correct version of WSL2 Ubuntu and import it again as WSL1 or just change the version to WSL1, the problem will not happen.