dotnet / source-build

A repository to track efforts to produce a source tarball of the .NET Core SDK and all its components
MIT License
265 stars 132 forks source link

Offline builds fail during build of aspnetcore repo trying to access NuGet feed #4304

Closed mthalman closed 7 months ago

mthalman commented 7 months ago

All offline builds are failing because the build of aspnetcore is attempting to restore from an external NuGet feed when using the --only-build-repo-tasks option. Example build job

Exec
    Assembly = Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    Parameters
        EnvironmentVariables
            FullAssemblySigningSupported=false
            DotNetBuildSourceOnly=true
        Command = ./eng/build.sh --only-build-repo-tasks -bl  /p:RestoreConfigFile=/vmr/artifacts/obj/aspnetcore/NuGet.config
        IgnoreStandardErrorWarningFormat = True
        WorkingDirectory = /vmr/src/aspnetcore/
    Environment Variables passed to tool:
      FullAssemblySigningSupported=false
      DotNetBuildSourceOnly=true
    CommandLineArguments = ./eng/build.sh --only-build-repo-tasks -bl  /p:RestoreConfigFile=/vmr/artifacts/obj/aspnetcore/NuGet.config
    warning: No default group of projects was specified, so building the 'managed' and its dependent subset of projects. Run build.sh --help for more details.
    warning: Building of C# project is enabled and has dependencies on NodeJS projects. Building of NodeJS projects is enabled since node is detected on PATH.
      Determining projects to restore...
    /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj : error NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json.
      Failed to restore /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj (in 5.65 sec).
    Build failed with exit code 1. Check errors above.
    Errors
        /vmr/src/aspnetcore/eng/DotNetBuild.props(48,5): error MSB3073: The command "./eng/build.sh --only-build-repo-tasks -bl  /p:RestoreConfigFile=/vmr/artifacts/obj/aspnetcore/NuGet.config" exited with code 1. [/vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Build.proj]
mthalman commented 7 months ago

Here's the Restore task for a failing build:

RestoreTask
    Assembly = /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll
    Parameters
        RestoreRecursive = True
        RestoreGraphItems
            6dc7a6a7-728c-4f2c-b7d2-49f49f96fb1a
                ProjectUniqueName = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                Type = RestoreSpec
            2fcf99d6-34ce-42a4-9566-0a30a718356c
                SkipContentFileWrite = 
                FallbackFolders = 
                CentralPackageFloatingVersionsEnabled = 
                NuGetLockFilePath = 
                ProjectUniqueName = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                RestoreLockedMode = 
                Sources = https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json;https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json
                NuGetAuditMode = direct
                Type = ProjectSpec
                NuGetAudit = true
                Version = 1.0.0
                _CentralPackageVersionsEnabled = 
                ValidateRuntimeAssets = false
                CrossTargeting = 
                WarningsAsErrors = 
                NuGetAuditLevel = low
                RestorePackagesWithLockFile = 
                RestoreLegacyPackagesDirectory = 
                ProjectStyle = PackageReference
                RuntimeSupports = 
                TreatWarningsAsErrors = false
                RuntimeIdentifiers = ;
                WarningsNotAsErrors = 
                NoWarn = 
                CentralPackageTransitivePinningEnabled = 
                OutputPath = /vmr/src/aspnetcore/artifacts/toolset/Common
                ProjectPath = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                CentralPackageVersionOverrideEnabled = 
                ProjectName = Tools
                PackagesPath = /vmr/src/aspnetcore/artifacts/sb/package-cache/
                ConfigFilePaths = /vmr/src/aspnetcore/NuGet.config
            cb78311c-9c4f-4a7c-9156-bc770b6676af
                ProjectUniqueName = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                IsImplicitlyDefined = true
                Id = Microsoft.DotNet.Build.Tasks.Feed
                Type = Dependency
                TargetFrameworks = net472
                VersionRange = 9.0.0-beta.24205.14
            832cae4b-46cc-47d5-8b3a-47b3b18dd012
                TargetFrameworkProfile = 
                TargetFramework = net472
                TargetFrameworkIdentifier = .NETFramework
                ProjectUniqueName = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                AssetTargetFallback = 
                PackageTargetFallback = 
                Type = TargetFrameworkInformation
                TargetPlatformVersion = 
                TargetPlatformMoniker = 
                TargetFrameworkMoniker = .NETFramework,Version=v4.7.2
                RuntimeIdentifierGraphPath = 
                CLRSupport = 
                TargetPlatformIdentifier = 
                TargetFrameworkVersion = 5
                WindowsTargetPlatformMinVersion = 
                TargetPlatformMinVersion = 
        HideWarningsAndErrors = False
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Packaging, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Packaging.dll, MVID: a5872115-ad31-41c6-8ee1-d250f9a89421, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.LibraryModel, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.LibraryModel.dll, MVID: dca91d3d-e887-45d7-adbe-fb21a6d2e8de, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Versioning, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Versioning.dll, MVID: 6c33ba60-7e6e-44e4-9bb0-f837223833cb, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.ObjectModel.dll, MVID: 96ecb177-02e6-4812-986d-c9ddac44b315, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Frameworks, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Frameworks.dll, MVID: 05e5996d-f121-4c49-b976-ad842a7e715b, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Protocol, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Protocol.dll, MVID: d5266668-ac7a-4040-8fc3-1c7012b4cabd, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Credentials, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Credentials.dll, MVID: ea901be9-37b6-4531-b6bb-6c0ca715f2cd, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Security.Cryptography.X509Certificates, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Security.Cryptography.X509Certificates.dll, MVID: 05a7264e-a136-4620-8d37-f1c02fd8c274, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Formats.Asn1, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Formats.Asn1.dll, MVID: 27a696be-23f4-49ff-a16a-e40ef06a5f11, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Runtime.Numerics, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Runtime.Numerics.dll, MVID: 98ace1a2-e57e-482e-b532-dd662416433a, AppDomain: Default)
    X.509 certificate chain validation will use the system certificate bundle at '/etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem'.
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.IO.FileSystem, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.IO.FileSystem.dll, MVID: 026b39d5-12c2-4469-904b-e976f2d1b72e, AppDomain: Default)
    X.509 certificate chain validation will use the fallback certificate bundle at '/vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/trustedroots/timestampctl.pem'.
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.DependencyResolver.Core, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.DependencyResolver.Core.dll, MVID: 73a3ef73-6ec0-428c-a2a0-f5c015892b67, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Running restore with 8 concurrent jobs.
    Reading project file
        Reading project file /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj.
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/Newtonsoft.Json.dll, MVID: 7e62198b-eab2-4380-bbac-29171862d1d8, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Runtime.Serialization.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Runtime.Serialization.Primitives.dll, MVID: 3993b922-794c-4243-bf12-6ecf009d0875, AppDomain: Default)
    Restoring packages for
        Restoring packages for /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj...
        Restoring packages for .NETFramework,Version=v4.7.2...
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Linq.Expressions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Linq.Expressions.dll, MVID: 8c3c9510-2ce1-4973-a351-b255460af9b2, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.ComponentModel.TypeConverter, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.ComponentModel.TypeConverter.dll, MVID: b83a9af0-7e18-4ecd-b53b-1aefc75f8be7, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Security.Cryptography.Algorithms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Security.Cryptography.Algorithms.dll, MVID: 0e519a40-c73d-4eb1-934c-18da668a7aed, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Security.Cryptography.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Security.Cryptography.Primitives.dll, MVID: 78d8cf76-dbfa-4713-a1e1-a7b670689cf3, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Net.Sockets, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Net.Sockets.dll, MVID: 4c4c4c79-450c-4ab7-ab9c-66e65278f91c, AppDomain: Default)
    Errors
        /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj error NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json. [/vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj]
    MSBuild file
        Generating MSBuild file /vmr/src/aspnetcore/artifacts/toolset/Common/Tools.proj.nuget.g.props.
        Generating MSBuild file /vmr/src/aspnetcore/artifacts/toolset/Common/Tools.proj.nuget.g.targets.
    Assets file
        Writing assets file to disk. Path: /vmr/src/aspnetcore/artifacts/toolset/Common/project.assets.json
    Cache file
        Writing cache file to disk. Path: /vmr/src/aspnetcore/artifacts/toolset/Common/project.nuget.cache
    dg file
        Persisting dg to /vmr/src/aspnetcore/artifacts/toolset/Common/Tools.proj.nuget.dgspec.json
    Failed to restore /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj (in 5.82 sec).
    NuGet Config files used:
        /vmr/src/aspnetcore/NuGet.config
    Feeds used:
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet9-transport/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6-transport/nuget/v3/index.json
        https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json
        https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-buildservices/nuget/v3/index.json
    OutputItems
        EmbedInBinlog
            /vmr/src/aspnetcore/artifacts/toolset/Common/project.assets.json
            /vmr/src/aspnetcore/artifacts/toolset/Common/Tools.proj.nuget.g.props
            /vmr/src/aspnetcore/artifacts/toolset/Common/Tools.proj.nuget.g.targets

Versus a working build:

RestoreTask
    Assembly = /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll
    Parameters
        RestoreGraphItems
            7c10a2ea-2876-46ba-b4a0-88cb431b2a76
                ProjectUniqueName = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                Type = ProjectSpec
                ProjectStyle = Unknown
                TargetFrameworks = net472
                ProjectPath = /vmr/artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj
                ProjectName = Tools
        RestoreRecursive = True
        HideWarningsAndErrors = False
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Packaging, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Packaging.dll, MVID: a5872115-ad31-41c6-8ee1-d250f9a89421, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.LibraryModel, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.LibraryModel.dll, MVID: dca91d3d-e887-45d7-adbe-fb21a6d2e8de, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Versioning, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Versioning.dll, MVID: 6c33ba60-7e6e-44e4-9bb0-f837223833cb, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.ObjectModel.dll, MVID: 96ecb177-02e6-4812-986d-c9ddac44b315, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Frameworks, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Frameworks.dll, MVID: 05e5996d-f121-4c49-b976-ad842a7e715b, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Protocol, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Protocol.dll, MVID: d5266668-ac7a-4040-8fc3-1c7012b4cabd, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.Credentials, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Credentials.dll, MVID: ea901be9-37b6-4531-b6bb-6c0ca715f2cd, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Security.Cryptography.X509Certificates, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Security.Cryptography.X509Certificates.dll, MVID: 05a7264e-a136-4620-8d37-f1c02fd8c274, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Formats.Asn1, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Formats.Asn1.dll, MVID: 27a696be-23f4-49ff-a16a-e40ef06a5f11, AppDomain: Default)
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.Runtime.Numerics, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.Runtime.Numerics.dll, MVID: 98ace1a2-e57e-482e-b532-dd662416433a, AppDomain: Default)
    X.509 certificate chain validation will use the system certificate bundle at '/etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem'.
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): System.IO.FileSystem, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (location: /vmr/.dotnet/shared/Microsoft.NETCore.App/9.0.0-preview.4.24178.3/System.IO.FileSystem.dll, MVID: 026b39d5-12c2-4469-904b-e976f2d1b72e, AppDomain: Default)
    X.509 certificate chain validation will use the fallback certificate bundle at '/vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/trustedroots/timestampctl.pem'.
    Assembly loaded during TaskRun (NuGet.Build.Tasks.RestoreTask): NuGet.DependencyResolver.Core, Version=6.10.0.97, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (location: /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.DependencyResolver.Core.dll, MVID: 73a3ef73-6ec0-428c-a2a0-f5c015892b67, AppDomain: MSBuild plugin /vmr/.dotnet/sdk/9.0.100-preview.4.24178.10/NuGet.Build.Tasks.dll)
    Nothing to do. None of the projects specified contain packages to restore.
mthalman commented 7 months ago

I've traced this regression to this commit: https://github.com/dotnet/dotnet/commit/bc2b8c5d1d8f3aecbb11517427cf3404fea08b45

MichaelSimons commented 7 months ago

cc @mmitche in case he spots something obvious.

mmitche commented 7 months ago

This probably:

https://github.com/dotnet/dotnet/commit/bc2b8c5d1d8f3aecbb11517427cf3404fea08b45#diff-7446ab1584f94eb360af392e1110853044b94e21fb1b751bdd1c9469f3c172c3R64-R68

But, this is built by Arcade. Why aren't the local feeds in that feed list during --only-build-repo-tasks?

mmitche commented 7 months ago

Oh maybe the restore config file isn't being passed through?

CommandLineArguments = ./eng/build.sh --only-build-repo-tasks -bl  /p:RestoreConfigFile=**/vmr/artifacts/obj/aspnetcore/NuGet.config**
    NuGet Config files used:
        /vmr/src/aspnetcore/NuGet.config
mthalman commented 7 months ago

I have a test build running right now which reverts https://github.com/dotnet/arcade/pull/14691 to confirm.

mthalman commented 7 months ago

I'm comparing the results of both a failing and previously passing build. In both cases, RestoreConfigFile is passed in but overridden by https://github.com/dotnet/arcade/blob/a4f367bfa9602e4c24f509902285176fa3153a64/src/Microsoft.DotNet.Arcade.Sdk/tools/Tools.proj#L24-L26

In the passing build, however, RestoreConfigFile is set as an environment variable which allows it to use that value instead. In the failing build, it doesn't show up as an env var.

mmitche commented 7 months ago

I think that's because we're setting an explicit set of environment variables for the build repo tasks invocation here: https://github.com/dotnet/aspnetcore/blob/main/eng/DotNetBuild.props#L38-L42

I think adding this and removing the other RestoreConfigFile parameter

<!-- Pass RestoreConfigFile through as an environment variable because the aspnetcore build scripts do not
           pass through arbitrary msbuild properties to the repo tasks build command -->
      <InnerBuildEnv Condition="'$(RestoreConfigFile)' != ''" Include="RestoreConfigFile=$(RestoreConfigFile)" />