dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.38k stars 4.75k forks source link

I can't build main branch because of ssl issue with the restore #52201

Open robertpi opened 3 years ago

robertpi commented 3 years ago

Description

I can't build main branch from this repo, as the restore stage fails with various SSL errors:

C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]

I the error messages is not always the sames, so it does look like a network issue, but could conceivably be something I'm doing wrong too.

Configuration

>dotnet --list-sdks
C:\code\runtime\.dotnet
6.0.100-preview.2.21155.3 [C:\code\runtime\.dotnet\sdk]

c:\code
>dotnet --list-sdks
2.1.815 [C:\Program Files\dotnet\sdk]
2.2.207 [C:\Program Files\dotnet\sdk]
3.0.103 [C:\Program Files\dotnet\sdk]
3.1.114 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]

Windows 10 -10.0.19042 Build 19042

x64

Regression?

This is the first time I've attempted to build on this laptop<

Other information

I noticed it looks similar to this issue: https://github.com/dotnet/runtime/issues/52053 , but I don't think it's the same issue as the download of the initial sdk seems to work okay.

dotnet-issue-labeler[bot] commented 3 years ago

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost commented 3 years ago

Tagging subscribers to this area: @dotnet/runtime-infrastructure See info in area-owners.md if you want to be subscribed.

Issue Details
### Description I can't build main branch from this repo, as the restore stage fails with various SSL errors: ``` C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj] C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj] C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj] C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj] ``` I the error messages is not always the sames, so it does look like a network issue, but could conceivably be something I'm doing wrong too. ### Configuration * Which version of .NET is the code running on? ``` >dotnet --list-sdks C:\code\runtime\.dotnet 6.0.100-preview.2.21155.3 [C:\code\runtime\.dotnet\sdk] c:\code >dotnet --list-sdks 2.1.815 [C:\Program Files\dotnet\sdk] 2.2.207 [C:\Program Files\dotnet\sdk] 3.0.103 [C:\Program Files\dotnet\sdk] 3.1.114 [C:\Program Files\dotnet\sdk] 5.0.101 [C:\Program Files\dotnet\sdk] ``` * What OS and version, and what distro if applicable? Windows 10 -10.0.19042 Build 19042 * What is the architecture (x64, x86, ARM, ARM64)? x64 ### Regression? This is the first time I've attempted to build on this laptop< ### Other information I noticed it looks similar to this issue: https://github.com/dotnet/runtime/issues/52053 , but I don't think it's the same issue as the download of the initial sdk seems to work okay.
Author: robertpi
Assignees: -
Labels: `area-Infrastructure`, `untriaged`
Milestone: -
hoyosjs commented 3 years ago

~Dupe of #51640. When you update to preview 3 like in #52196, the issue should go away. Feel free to comment if this doesn't work and I'll reopen.~

danmoseley commented 3 years ago

Wasn't that linux only @hoyosjs ?

ericstj commented 3 years ago

51640 was with package signing, this appears to be happen earlier than that, when Nuget is connecting to AzDo feed.

I noticed it looks similar to this issue: #52053 , but I don't think it's the same issue as the download of the initial sdk seems to work okay.

Download of the initial SDK doesn't happen through latest .NET runtime, it uses PowerShell which will use .NETFramework in OS. It could be the same issue. cc @dotnet/ncl

hoyosjs commented 3 years ago

Indeed. My bad, I somehow read the message and missed the path completely. This seems like a rude closed connection. The only thing that I could find around this is https://developercommunity.visualstudio.com/t/deployment-failing-in-release-pipeline-1/932190 and https://github.com/microsoft/azure-pipelines-tasks/issues/12444#issuecomment-593517116. Not sure if it applies as I don't see a TLS version warning on yours, but this is easy to check.

robertpi commented 3 years ago

I checked that I'm using a recent version of powershell, it seems it meets the minimum specified:

PS C:\Users\rober> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  906

I also entered the following values into my registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

This didn't seem to make any difference.

If I try to manually download the url causing an issue, it seems to work fine:

PS C:\Users\rober> (New-Object System.Net.WebClient).DownloadString("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json")
{"@context":{"@vocab":"http://schema.nuget.org/services#","comment":"http://www.w3.org/2000/01/rdf-schema#comment","label":"http://www.w3.org/2000/01/rdf-schema#label"},"resources":[{"@id":"https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c ...
robertpi commented 3 years ago

I decided to check with fiddle which URLs were failing, but this seemed to cause the error message to change, to variations of the following:

c:\code\runtime
>build.cmd -Restore
  Determining projects to restore...
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.21227.1') was restored. Available commands: xharness
  Tool 'microsoft.visualstudio.slngen.tool' (version '5.0.5') was restored. Available commands: slngen

  Restore was successful.
  Failed to download package 'Microsoft.DotNet.SignTool.6.0.0-beta.21222.1' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.signtool/6.0.0-beta.21222.1/microsoft.dotnet.signtool.6.0.0-beta.21222.1.nupkg'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Failed to download package 'Microsoft.DotNet.SignTool.6.0.0-beta.21222.1' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.signtool/6.0.0-beta.21222.1/microsoft.dotnet.signtool.6.0.0-beta.21222.1.nupkg'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.dotnet.build.tasks.packaging/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : Failed to retrieve information about 'Microsoft.DotNet.PackageValidation' from remote source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]

Build FAILED.

C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error : Failed to retrieve information about 'Microsoft.DotNet.PackageValidation' from remote source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.packagevalidation/index.json'. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:04.98
Build failed with exit code 1. Check errors above.
Some builds failed:
        Configuration: Debug, Architecture: x64

I noticed that while some failures were for .json index files, others where for actual nuget packages, for example: https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.signtool/6.0.0-beta.21222.1/microsoft.dotnet.signtool.6.0.0-beta.21222.1.nupkg. I found I could download these packages manually via Chrome, which seems to have some retry mechanism build in.

I installed this packages locally via:

dotnet nuget add source C:\Users\rober\AppData\Local\PackageManagement\NuGet\Packages

Install-Package microsoft.dotnet.build.tasks.feed -Scope CurrentUser -Source C:\Users\rober\Downloads\

Once the following packages were installed locally, the build seems to get a little further:

Microsoft.DotNet.Build.Tasks.Feed.6.0.0-beta.21222.1
Microsoft.DotNet.Build.Tasks.Packaging.6.0.0-beta.21222.1
Microsoft.DotNet.PackageValidation.6.0.0-beta.21222.1
Microsoft.DotNet.SignTool.6.0.0-beta.21222.1
Microsoft.DotNet.VersionTools.Tasks.6.0.0-beta.21222.1

However the build still fails with this error:

c:\code\runtime
>build.cmd -Restore
  Determining projects to restore...
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.21227.1') was restored. Available commands: xharness
  Tool 'microsoft.visualstudio.slngen.tool' (version '5.0.5') was restored. Available commands: slngen

  Restore was successful.
  All projects are up-to-date for restore.
  Determining projects to restore...
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error : The result "" of evaluating the value "$(DotNetSharedFrameworkTaskFile)" of the "AssemblyFile" attribute in element <UsingTask> is not valid.  C:\code\runtime\src\libraries\ref.proj [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1,T2,T3,T4](Boolean condition, String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, T1 arg0, T2 arg1, T3 arg2, T4 arg3) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Execution.TaskRegistry.RegisterTasksFromUsingTaskElement[P,I](ILoggingService loggingService, BuildEventContext buildEventContext, String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskXml, TaskRegistry taskRegistry, Expander`2 expander, ExpanderOptions expanderOptions, IFileSystem fileSystem) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateUsingTaskElement(String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskElement) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.FromFile(String file, ProjectOptions options) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.<>c__DisplayClass38_1.<LoadProjects>b__0(String path, Dictionary`2 properties, ProjectCollection collection) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.ParseProject(ConfigurationMetadata configurationMetadata) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.<>c__DisplayClass35_0.<SubmitProjectForParsing>b__0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.CreateValue() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.get_Value() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.ExecuteWorkItem() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.<CreateProcessorItemTask>b__16_0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.WaitForAllWorkAndComplete() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.FindGraphNodes() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.BuildGraph() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory, Int32 degreeOfParallelism, CancellationToken cancellationToken) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.LoadProjects(IEnumerable`1 entryProjects) [C:\code\runtime\Build.proj]

Build FAILED.

C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error : The result "" of evaluating the value "$(DotNetSharedFrameworkTaskFile)" of the "AssemblyFile" attribute in element <UsingTask> is not valid.  C:\code\runtime\src\libraries\ref.proj [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1,T2,T3,T4](Boolean condition, String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, T1 arg0, T2 arg1, T3 arg2, T4 arg3) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Execution.TaskRegistry.RegisterTasksFromUsingTaskElement[P,I](ILoggingService loggingService, BuildEventContext buildEventContext, String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskXml, TaskRegistry taskRegistry, Expander`2 expander, ExpanderOptions expanderOptions, IFileSystem fileSystem) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateUsingTaskElement(String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskElement) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.FromFile(String file, ProjectOptions options) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.<>c__DisplayClass38_1.<LoadProjects>b__0(String path, Dictionary`2 properties, ProjectCollection collection) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.ParseProject(ConfigurationMetadata configurationMetadata) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.<>c__DisplayClass35_0.<SubmitProjectForParsing>b__0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.CreateValue() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.get_Value() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.ExecuteWorkItem() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.<CreateProcessorItemTask>b__16_0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.WaitForAllWorkAndComplete() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.FindGraphNodes() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.BuildGraph() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory, Int32 degreeOfParallelism, CancellationToken cancellationToken) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.LoadProjects(IEnumerable`1 entryProjects) [C:\code\runtime\Build.proj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:11.19
Build failed with exit code 1. Check errors above.
Some builds failed:
        Configuration: Debug, Architecture: x64

Examining the http requests with fiddler, I see the download of this package fails repeatedly:

GET https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.dotnet.sharedframework.sdk/index.json HTTP/1.1
Host: pkgs.dev.azure.com
X-NuGet-Session-Id: a18c7270-e1aa-4aeb-bf5a-400b35a64a36
User-Agent: NuGet Client V3/5.10.0
X-NuGet-Client-Version: 5.10.0
Accept-Language: en-GB
Accept-Encoding: gzip, deflate

{"$id":"1","innerException":null,"message":"Can't find the package 'microsoft.dotnet.sharedframework.sdk' in feed 'dotnet6'.","typeName":"Microsoft.VisualStudio.Services.NuGet.WebApi.Exceptions.PackageNotFoundException, Microsoft.VisualStudio.Services.NuGet.WebApi","typeKey":"PackageNotFoundException","errorCode":0,"eventId":3000}

Since I have no way to install microsoft.dotnet.sharedframework.sdk, I'm not sure how to get any further with this.

ViktorHofer commented 3 years ago

How many SDKs do you currently have installed? In case you have old 2.x or 3.x ones installed, you could try deleting those. Also we are updating the SDK to Preview 3 later today, that might also help you to get further.

robertpi commented 3 years ago

I have quite a few old sdks installed:

>dotnet --list-sdks
2.1.815 [C:\Program Files\dotnet\sdk]
2.2.207 [C:\Program Files\dotnet\sdk]
3.0.103 [C:\Program Files\dotnet\sdk]
3.1.114 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]

But I'd be reluctant to remove them, since I need to be able to test with a wide range of frameworks. I don't really see how it would help, since fiddle seems to show it's very recent version of nuget that are making the failing requests.

I just tried building the v5.0.5 tag and that fails with similar issues, which makes me think the problem related to nuget servers supporting this build, although if that's the case, I don't really understand why other people aren't complaining about it.

ViktorHofer commented 3 years ago

I recommended to delete these old SDKs as IIRC @tmds it a similar issues and deleting old SDKs helped him. Maybe you could give it a try and afterwards reinstall the old ones?

robertpi commented 3 years ago

I removed all sdks apart from 5.0.101 and tried again.

When I try to build tag v5.0.5, I get this error:

>build.cmd -Restore
  Determining projects to restore...
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.20403.2') was restored. Available commands: xharness

  Restore was successful.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Failed to retrieve information about 'Microsoft.DotNet.VersionTools.Tasks' from remote source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]

Build FAILED.

C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error : Failed to retrieve information about 'Microsoft.DotNet.VersionTools.Tasks' from remote source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.100\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.78
Build failed.
Some builds failed:
        Configuration: Debug, Architecture: x64

If I try and build the latest main I get:

>build.cmd -Restore
GET https://dot.net/v1/dotnet-install.ps1
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.100-preview.2.21155.3/dotnet-sdk-6.0.100-preview.2.21155.3-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/6.0.100-preview.2.21155.3/dotnet-sdk-6.0.100-preview.2.21155.3-win-x64.zip
dotnet-install: Adding to current process PATH: "C:\code\runtime\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies
dotnet-install: Installation finished
  Determining projects to restore...
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.21227.1') was restored. Available commands: xharness
  Tool 'microsoft.visualstudio.slngen.tool' (version '5.0.5') was restored. Available commands: slngen

  Restore was successful.
  Restored C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\6.0.0-beta.21222.1\tools\Tools.proj (in 571 ms).
  Determining projects to restore...
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error : The result "" of evaluating the value "$(DotNetSharedFrameworkTaskFile)" of the "AssemblyFile" attribute in element <UsingTask> is not valid.  C:\code\runtime\src\libraries\ref.proj [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1,T2,T3,T4](Boolean condition, String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, T1 arg0, T2 arg1, T3 arg2, T4 arg3) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Execution.TaskRegistry.RegisterTasksFromUsingTaskElement[P,I](ILoggingService loggingService, BuildEventContext buildEventContext, String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskXml, TaskRegistry taskRegistry, Expander`2 expander, ExpanderOptions expanderOptions, IFileSystem fileSystem) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateUsingTaskElement(String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskElement) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.FromFile(String file, ProjectOptions options) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.<>c__DisplayClass38_1.<LoadProjects>b__0(String path, Dictionary`2 properties, ProjectCollection collection) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.ParseProject(ConfigurationMetadata configurationMetadata) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.<>c__DisplayClass35_0.<SubmitProjectForParsing>b__0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.CreateValue() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.get_Value() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.ExecuteWorkItem() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.<CreateProcessorItemTask>b__16_0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.WaitForAllWorkAndComplete() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.FindGraphNodes() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.BuildGraph() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory, Int32 degreeOfParallelism, CancellationToken cancellationToken) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.LoadProjects(IEnumerable`1 entryProjects) [C:\code\runtime\Build.proj]

Build FAILED.

C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error : The result "" of evaluating the value "$(DotNetSharedFrameworkTaskFile)" of the "AssemblyFile" attribute in element <UsingTask> is not valid.  C:\code\runtime\src\libraries\ref.proj [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.ThrowInvalidProject(String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, Object[] args) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Shared.ProjectErrorUtilities.VerifyThrowInvalidProject[T1,T2,T3,T4](Boolean condition, String errorSubCategoryResourceName, IElementLocation elementLocation, String resourceName, T1 arg0, T2 arg1, T3 arg2, T4 arg3) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Execution.TaskRegistry.RegisterTasksFromUsingTaskElement[P,I](ILoggingService loggingService, BuildEventContext buildEventContext, String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskXml, TaskRegistry taskRegistry, Expander`2 expander, ExpanderOptions expanderOptions, IFileSystem fileSystem) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.EvaluateUsingTaskElement(String directoryOfImportingFile, ProjectUsingTaskElement projectUsingTaskElement) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDictionary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, ProjectRootElementCacheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Reevaluate(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(ILoggingService loggingServiceForEvaluation, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.ReevaluateIfNecessary(EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.ProjectImpl.Initialize(IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Evaluation.Project.FromFile(String file, ProjectOptions options) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.<>c__DisplayClass38_1.<LoadProjects>b__0(String path, Dictionary`2 properties, ProjectCollection collection) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.ParseProject(ConfigurationMetadata configurationMetadata) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.<>c__DisplayClass35_0.<SubmitProjectForParsing>b__0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.CreateValue() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at System.Lazy`1.get_Value() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.ExecuteWorkItem() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.<CreateProcessorItemTask>b__16_0() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ParallelWorkSet`2.WaitForAllWorkAndComplete() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.FindGraphNodes() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.BuildGraph() [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory, Int32 degreeOfParallelism, CancellationToken cancellationToken) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) [C:\code\runtime\Build.proj]
C:\code\runtime\.dotnet\sdk\6.0.100-preview.2.21155.3\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.LoadProjects(IEnumerable`1 entryProjects) [C:\code\runtime\Build.proj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:33.84
Build failed with exit code 1. Check errors above.
Some builds failed:
        Configuration: Debug, Architecture: x64
ViktorHofer commented 3 years ago

If I try and build the latest main I get:

This indicates that the nuget sdk resolver silently failed when restoring the SDK package. cc @nkolev92

When I try to build tag v5.0.5, I get this error:

Hmm that's unfortunate. As a last resort, could you please try to build again from a clean repo (git clean -xdf) with the following change:

image

Thanks a lot

robertpi commented 3 years ago

I tried to clean build (git clean -xdf) tag v5.0.5 with the modifications suggested, but still get similar error messages:

c:\code\runtime
>build.cmd -Restore
GET https://dot.net/v1/dotnet-install.ps1
dotnet-install: Note that the intended use of this script is for Continuous Integration (CI) scenarios, where:
dotnet-install: - The SDK needs to be installed without user interaction and without admin rights.
dotnet-install: - The SDK installation doesn't need to persist across multiple CI runs.
dotnet-install: To set up a development environment or to run apps, use installers rather than this script. Visit https://dotnet.microsoft.com/download to get the installer.

dotnet-install: Downloading primary link https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.202/dotnet-sdk-5.0.202-win-x64.zip
dotnet-install: Extracting zip from https://dotnetcli.azureedge.net/dotnet/Sdk/5.0.202/dotnet-sdk-5.0.202-win-x64.zip
dotnet-install: Adding to current process PATH: "C:\code\runtime\.dotnet\". Note: This change will not be visible if PowerShell was run as a child process.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies
dotnet-install: Installation finished

Welcome to .NET 5.0!
---------------------
SDK Version: 5.0.202

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
  Determining projects to restore...
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.20403.2') was restored. Available commands: xharness

  Restore was successful.
  Failed to download package 'Microsoft.DotNet.SignTool.5.0.0-beta.21159.7' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.signtool/5.0.0-beta.21159.7/microsoft.dotnet.signtool.5.0.0-beta.21159.7.nupkg'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Failed to download package 'Microsoft.DotNet.SignTool.5.0.0-beta.21159.7' from 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.signtool/5.0.0-beta.21159.7/microsoft.dotnet.signtool.5.0.0-beta.21159.7.nupkg'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a8a526e9-91b3-4569-ba2d-ff08dbb7c110/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/7d9f5c21-0d79-403f-bfe3-9a4506529760/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/a8a526e9-91b3-4569-ba2d-ff08dbb7c110/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.versiontools.tasks/index.json'.
  The SSL connection could not be established, see inner exception.
    Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
    An existing connection was forcibly closed by the remote host.
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error : Failed to retrieve information about 'Microsoft.DotNet.Build.Tasks.Feed' from remote source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]

Build FAILED.

C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error : Failed to retrieve information about 'Microsoft.DotNet.Build.Tasks.Feed' from remote source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.dotnet.build.tasks.feed/index.json'. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error :   The SSL connection could not be established, see inner exception. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error :   Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
C:\code\runtime\.dotnet\sdk\5.0.202\NuGet.targets(131,5): error :   An existing connection was forcibly closed by the remote host. [C:\Users\rober\.nuget\packages\microsoft.dotnet.arcade.sdk\5.0.0-beta.21159.7\tools\Tools.proj]
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:03.34
Build failed.
Some builds failed:
        Configuration: Debug, Architecture: x64
ViktorHofer commented 3 years ago

Thanks for trying the suggested workarounds out. In this case I don't know how to help further. Let me ping the @dotnet/nuget-team who are hopefully able to help.

robertpi commented 3 years ago

So it turns out the issue is my wifi router or ISP. After a brief automated reboot of my wifi router made me think, what if the problem is the network, but my network infrastructure, so I switched by laptop to use my phones 4G connection and the restore phase worked just fine (if a little slower than I might have hoped).

The actual build phase is running now, so all good.

I'd be very interested into digging into why the ssl connections to pkgs.dev.azure.com was failing over my home wifi. I can connect to nuget.org without issue and, a few route reboots aside, my internet seems quite stable. Not quite sure where I should start looking.

ViktorHofer commented 3 years ago

@johnterickson for the AzDO packaging related question. Maybe you can help @robertpi diagnose this further?

zivkan commented 3 years ago

From NuGet's perspective, we use HttpClient in a very standard way, allowing it to handle SSL. Hence when the networking issues were happening, I would have expected a console app with await new HttpClient().GetAsStream("https://pkgs.dev.azure.com") to fail with the same exception. The System.Net.Http experts here in dotnet/runtime will have better suggestions than I do. If you're really curious about investigating it, should it happen again, my best guess would be to start with WireShark, but possibly an ETW trace with networking information could help too.

Given the error message "An existing connection was forcibly closed by the remote host", it sounds to me like the operating system was seeing a TCP packet to close the TCP connection, while the SSL stream was expecting it to remain open. WireShark might help you see a TCP FIN packet, if that's really the case. Whether that originated from your router or your ISP or a pkgs.dev.azure.com CDN endpoint, I'm not sure if it's possible to determine. This is very much outside my expertise.

All I can say as a NuGet expert is that the .NET HttpClient didn't give us a successful connection to do transfers over.

wfurt commented 3 years ago

I know it may be hard to know where this is coming from but the An existing connection was forcibly closed by the remote host. really comes from OS e.g. TCP stack. Pretty much in all cases I have seen so far this is caused by upstream network or firewalls and has nothing to do with actually SSL or Http.

Aside from firewalls and real network failures, it may be possible that one provider uses IPv6 and the other does not. Also with global load ballancing using different ISP may connect you to different region. Wireshark packet capture would show either one.

johnterickson commented 3 years ago

What doesn't make sense to me is that it works with PowerShell

(New-Object System.Net.WebClient).DownloadString("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json")

but not with NuGet. We're not doing any User-Agent trickery or anything like that 🤷‍♂️

robertpi commented 3 years ago

@johnterickson I later found out that (New-Object System.Net.WebClient).DownloadString("https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json") did fail sometimes too, as did curl and requests from web browsers. It was intermittent, so it was quite difficult to figure out what was failing and what wasn't.

karelz commented 3 years ago

Looks like there is not much we can do here ... this indeed looks like external problem, beyond the local machine (given it fails as well with curl, PS, etc.). Should we close it or is there anything left here to troubleshoot or help with?

robertpi commented 3 years ago

My suspicion is this is global load balancing sending me to a dodgy set of nuget servers, which is one of the things @wfurt mentioned, in that case there would be some infrastructure issues to correct. But it could be lots of other things too, so feel free to close if there's nothing that can be done on this front.

ViktorHofer commented 3 years ago

Thanks @robertpi. Closing.

janvorli commented 3 years ago

@karelz I have started to get the same problem on all my local physical devices (macOS, Linux, Windows). And after cleaning the nuget cache on one of the devices, I cannot build anything from the runtime repo anymore. This is what happens:

  Determining projects to restore...
  Tool 'coverlet.console' (version '1.7.2') was restored. Available commands: coverlet
  Tool 'dotnet-reportgenerator-globaltool' (version '4.5.8') was restored. Available commands: reportgenerator
  Tool 'microsoft.dotnet.xharness.cli' (version '1.0.0-prerelease.21357.4') was restored. Available commands: xharness
  Tool 'microsoft.visualstudio.slngen.tool' (version '5.0.5') was restored. Available commands: slngen

  Restore was successful.
  Restored /Users/janvorli/.nuget/packages/microsoft.dotnet.arcade.sdk/6.0.0-beta.21357.3/tools/Tools.proj (in 6.03 sec).
  Determining projects to restore...
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.dotnet.codeanalysis/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.dotnet.codeanalysis/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/stylecop.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/stylecop.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/stylecop.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/stylecop.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/stylecop.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.codeanalysis.netanalyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.codeanalysis.csharp.codestyle/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/45bacae2-5efb-47c8-91e5-8ec20c22b4f8/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.net.illink.analyzers/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/825db618-e3eb-4426-ba54-b1d6e6c944d8/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/c9f8ac11-6bd8-4926-8306-f075241547f7/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/stylecop.analyzers.unstable/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/azure-public/3ccf6661-f8ce-4e8a-bb2e-eff943ddd3c7/_packaging/58ca65bb-e6c1-4210-88ac-fa55c1cd7877/nuget/v3/flat2/microsoft.dotnet.genfacades/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host
  Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/1a5f89f6-d8da-4080-b15f-242650c914a8/nuget/v3/flat2/system.net.msquic.transport/index.json'.
  No route to host (pkgs.dev.azure.com:443)
    No route to host

Using browser / wget on most of these URLs works fine, so I assume it is some issue in the HttpClient w.r.t. my internet provider infra or something like that. Close before the issue started to happen, I got my internet modem replaced. I can provide a packet capture from WireShark on Windows if that helps. Or do whatever debugging you'd recommend.

wfurt commented 3 years ago

Can you check what site it resolves to @janvorli ?

furt@ubu20:~/github/wfurt-runtime/src/libraries/System.Net.Http/src$ ping pkgs.dev.azure.com
PING l-0011.l-msedge.net (13.107.42.20) 56(84) bytes of data.
64 bytes from 13.107.42.20 (13.107.42.20): icmp_seq=1 ttl=128 time=4.77 ms

This seems like some CDN. Also HttpClient would prefer IPv6 if available. In this case the name does not seems to resolve to IPv6 (at least for me) so it should not problem but it something to remember.

janvorli commented 3 years ago

The same as yours:

janvorli-mac:nuget janvorli$ ping pkgs.dev.azure.com
PING l-0011.l-msedge.net (13.107.42.20): 56 data bytes
64 bytes from 13.107.42.20: icmp_seq=0 ttl=119 time=28.226 ms
64 bytes from 13.107.42.20: icmp_seq=1 ttl=119 time=13.918 ms
janvorli commented 3 years ago

I have also tried to create a simple test app like this and compile it with the latest .NET 6. All of the URLs above return HTTP error 404, which is kind of strange by itself, but none complains about no route to host. And the errors above are 100% repeatable.

using System;

namespace nuget
{
    class Program
    {
        static void Main(string[] args)
        {
            var task = new System.Net.Http.HttpClient().GetAsync(args[0]);
            task.Wait();
            task.Result.EnsureSuccessStatusCode();
        }
    }
}

So I wonder if it is possible that the nuget version used by the build uses some old .NET runtime that had some issue that is resolved in the latest.

janvorli commented 3 years ago

Btw, opening these URLs return 404 even in Chrome on Windows, the contents of the response is similar for all of them, one example being: {"$id":"1","innerException":null,"message":"Can't find the package 'stylecop.analyzers' in feed 'dotnet-tools'.","typeName":"Microsoft.VisualStudio.Services.NuGet.WebApi.Exceptions.PackageNotFoundException, Microsoft.VisualStudio.Services.NuGet.WebApi","typeKey":"PackageNotFoundException","errorCode":0,"eventId":3000}

janvorli commented 3 years ago

This was for the https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/d1622942-d16f-48e5-bc83-96f4539e7601/nuget/v3/flat2/stylecop.analyzers/index.json

janvorli commented 3 years ago

Btw, in the Wireshark log, I can see quite a number of "TCP Retransmission", "TCP Spurious Retransmission" and "TCP Dup ACK 508680". I wonder if it could be related in some way and our HttpClient hickups on these.

506840  72.573816   192.168.1.3 13.107.43.20    TCP 501 [TCP Retransmission] 58467 → 443 [PSH, ACK] Seq=5130 Ack=16847 Win=261376 Len=447
507631  73.339456   192.168.1.3 13.107.43.20    TCP 501 [TCP Retransmission] 58467 → 443 [PSH, ACK] Seq=5130 Ack=16847 Win=261376 Len=447
508537  73.908387   13.107.43.20    192.168.1.3 TCP 60  443 → 58467 [ACK] Seq=16847 Ack=5577 Win=524800 Len=0
508636  74.055391   13.107.43.20    192.168.1.3 TLSv1.2 1308    Application Data
508680  74.106650   192.168.1.3 13.107.43.20    TCP 54  58467 → 443 [ACK] Seq=5577 Ack=18101 Win=262656 Len=0
508954  74.357202   13.107.43.20    192.168.1.3 TLSv1.2 1308    [TCP Spurious Retransmission] , Application Data
508955  74.357208   192.168.1.3 13.107.43.20    TCP 66  [TCP Dup ACK 508680#1] 58467 → 443 [ACK] Seq=5577 Ack=18101 Win=262656 Len=0 SLE=16847 SRE=18101

I can also see many logs as the following ones that Wireshark marks with red color, so I assume there is something wrong. Maybe the Win/Len being zero? But my knowledge of the TCP protocol has faded over the years, so I am not sure.

505921  71.645691   13.107.43.20    192.168.1.3 TCP 60  443 → 61077 [RST] Seq=1 Win=0 Len=0
janvorli commented 3 years ago

And also this one:

98496   49.699509   192.168.1.3 13.107.43.20    TLSv1.2 212 [TCP ACKed unseen segment] , Client Key Exchange, Change Cipher Spec, Encrypted Handshake Message
wfurt commented 3 years ago

The 13.107.43.20 is the server ... or networking gear in the middle. All the TCP is handle by the Linux kernel. What matters is stream of data we read from the socket.

wfurt commented 3 years ago

BTW there also seems to be some general outage https://github.com/dotnet/core-eng/issues/13691

janvorli commented 3 years ago

It seems it is even more involved. Rerunning the build of clr+libs multiple times ended up passing, so it seems that the problem is really intermittent. As for the outage you've mentioned, I was never getting 50x responses.

wfurt commented 3 years ago

It is possible that your ISP has some transparent caches and once they cannot fetch the file they give you different error. With CDN in place networking is way more complicated. In your case this looks like some packet loss at least. I'm not sure what your filer is but the No route to host probably comes ICP message.

janvorli commented 3 years ago

I've just learned that the 404 error codes are benign. Nuget tries to fetch packages from all the configured sources and the 404 just means that the intermittent issue happened when trying to fetch it from other sources than the one it was in.

janvorli commented 3 years ago

In the intermittent cases, there are no HTTP response codes, as the communication gets broken in various ways.