0

I'm configuring an ADO Build Pipeline, however, it's failing on the Install NuGet step

YAML

trigger:
- master

pool:
  name: TestPool

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

I got the following error

You are using a query match on the version string. Behavior changes or breaking changes might occur as NuGet updates to a new version. ERR:Client network socket disconnected before secure TLS connection was established

Matt
  • 3,658
  • 3
  • 14
  • 27
Big Ian
  • 163
  • 3
  • 12

1 Answers1

0

According to the YAML and error message, it seems that you are using self-hosted agent and the error related to the TLS.

Since more and more Microsoft products/services are deprecating TLS 1.0 and 1.1, you need to ensure your applications to be working well using TLS 1.2.

You could use the following script to check if the TLS is ok.

(Invoke-WebRequest -Uri status.dev.azure.com).StatusDescription

If it does not OK, you need to enable the TLS 1.2 in your self-hosted agent.

And try to use the specific nuget version.

- task: NuGetToolInstaller@1
  inputs:
    versionSpec: 4.x
    checkLatest: true
Ging Yuan-MSFT
  • 689
  • 2
  • 6
  • tls 1.0 -1.1 are disabled tls 1.2 is supported (Client & Server) I tried updating the Yaml as you suggested am still getting the same error – Big Ian Dec 22 '22 at 10:43
  • Have you check if the tls is 1.2? (Invoke-WebRequest -Uri status.dev.azure.com).StatusDescription it should be return ok – Ging Yuan-MSFT Dec 22 '22 at 10:55
  • Yes though had to add the -UseBasicParsing parameter – Big Ian Dec 22 '22 at 11:06
  • please check the proxy: https://stackoverflow.com/questions/53593182/client-network-socket-disconnected-before-secure-tls-connection-was-established – Ging Yuan-MSFT Dec 28 '22 at 02:26