Are the .NET packages missing a ca-certificates
dependency?
$ docker run --rm -it ubuntu:jammy
root@708727f57f49:/# apt update
root@708727f57f49:/# apt install -y dotnet6
root@708727f57f49:/# dotnet --version
6.0.127
root@708727f57f49:/# ls -l $(which dotnet)
lrwxrwxrwx 1 root root 20 Feb 9 05:10 /usr/bin/dotnet -> ../lib/dotnet/dotnet
root@708727f57f49:/# dotnet new console -o app6
root@708727f57f49:/# dotnet run --project app6/app6.csproj
Hello, World!
root@708727f57f49:/# echo Console.WriteLine\(\$\"Hello \{System.Runtime.InteropServices.RuntimeInformation.OSDescription\} from \{System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription\}\"\)\; > app6/Program.cs
root@708727f57f49:/# dotnet run --project app6/app6.csproj
Hello Linux 6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:58:39 UTC 2024 from .NET 6.0.27
root@708727f57f49:/# apt install -y dotnet7
root@708727f57f49:/# dotnet --version
7.0.117
root@708727f57f49:/# dotnet new console -o app7
root@708727f57f49:/# dotnet run --project app7/app7.csproj
Hello, World!
root@708727f57f49:/# echo Console.WriteLine\(\$\"Hello \{System.Runtime.InteropServices.RuntimeInformation.OSDescription\} from \{System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription\}\"\)\; > app7/Program.cs
root@708727f57f49:/# dotnet run --project app6/app6.csproj
/app6/app6.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
/app6/app6.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
/app6/app6.csproj : error NU1301: Unable to load the service index for source https://api.nuget.org/v3/index.json.
The build failed. Fix the build errors and run again.
root@708727f57f49:/# apt install -y ca-certificates
root@708727f57f49:/# dotnet run --project app6/app6.csproj
Hello Linux 6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:58:39 UTC 2024 from .NET 6.0.27
root@708727f57f49:/# dotnet run --project app7/app7.csproj
Hello Linux 6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:58:39 UTC 2024 from .NET 7.0.17
root@708727f57f49:/# apt install -y dotnet8
root@708727f57f49:/# dotnet --version
8.0.103
root@708727f57f49:/# dotnet new console -o app8
root@708727f57f49:/# dotnet run --project app8/app8.csproj
Hello, World!
root@708727f57f49:/# dotnet run --project app6/app6.csproj
Hello Linux 6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:58:39 UTC 2024 from .NET 6.0.27
root@708727f57f49:/# dotnet run --project app7/app7.csproj
Hello Linux 6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:58:39 UTC 2024 from .NET 7.0.17
root@708727f57f49:/# dotnet run --project app8/app8.csproj
Hello Ubuntu 22.04.4 LTS from .NET 8.0.3
Console.WriteLine($"Hello {System.Runtime.InteropServices.RuntimeInformation.OSDescription} from {System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription}");