Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

Unable to restore tools with Tye in Azure DevOps since .NET 8 RC2 #1615

Description

@Kralizek

Describe the bug

Starting today, 2023-10-11, my ADO pipeline is failing when executing dotnet tool restore with Tye 0.11 in the config file.

The command runs correctly locally.

To Reproduce

I didn't try the repo myself.

But I guess a pipeline as simple as the following should suffice

pr:
  branches:
    include:
      - '*'
  paths:
    include:
      - backend

trigger:
  branches:
    include:
      - '*'
  paths:
    include:
      - backend
  tags:
    include:
      - '*'

pool:
  vmImage: 'ubuntu-latest'

steps:

  - task: UseDotNet@2
    displayName: Install .NET 8 SDK
    inputs:
      packageType: 'sdk'
      version: '8.x'
      installationPath: $(Agent.ToolsDirectory)/dotnet
      includePreviewVersions: true
  
  - script: dotnet --version
    displayName: Show installed .NET SDK version

  - script: dotnet tool restore
    displayName: Restore tools

This is the log of the ADO step

Starting: Restore tools
==============================================================================
Task         : Command line
Description  : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version      : 2.212.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
dotnet tool restore
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/a74834fe-976a-4ea1-bf1a-9a021056d43a.sh
Skipping NuGet package signature verification.
Unhandled exception: System.AggregateException: One or more errors occurred. (microsoft.tye::[*, ) is not found in NuGet feeds [https://api.nuget.org/v3/index.json".](https://api.nuget.org/v3/index.json%22.))
 ---> Microsoft.DotNet.Cli.NuGetPackageDownloader.NuGetPackageNotFoundException: microsoft.tye::[*, ) is not found in NuGet feeds [https://api.nuget.org/v3/index.json".](https://api.nuget.org/v3/index.json%22.)
   at Microsoft.DotNet.Cli.NuGetPackageDownloader.NuGetPackageDownloader.GetMatchingVersionInternalAsync(String packageIdentifier, IEnumerable`1 packageSources, VersionRange versionRange, CancellationToken cancellationToken)
   at Microsoft.DotNet.Cli.NuGetPackageDownloader.NuGetPackageDownloader.GetBestPackageVersionAsync(PackageId packageId, VersionRange versionRange, PackageSourceLocation packageSourceLocation)
   at Microsoft.DotNet.Cli.ToolPackage.ToolPackageDownloader.<>c__DisplayClass8_0.<InstallPackage>b__0()
   at Microsoft.DotNet.Cli.TransactionalAction.Run[T](Func`1 action, Action commit, Action rollback)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)
   at System.Linq.Parallel.SelectQueryOperator`2.SelectQueryOperatorResults.GetElement(Int32 index)
   at System.Linq.Parallel.QueryResults`1.get_Item(Int32 index)
   at System.Linq.Parallel.PartitionedDataSource`1.ListContiguousIndexRangeEnumerator.MoveNext(T& currentElement, Int32& currentKey)
   at System.Linq.Parallel.StopAndGoSpoolingTask`2.SpoolingWork()
   at System.Linq.Parallel.SpoolingTaskBase.Work()
   at System.Linq.Parallel.QueryTask.BaseWork(Object unused)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   --- End of inner exception stack trace ---
   at System.Linq.Parallel.QueryTaskGroupState.QueryEnd(Boolean userInitiatedDispose)
   at System.Linq.Parallel.SpoolingTask.SpoolStopAndGo[TInputOutput,TIgnoreKey](QueryTaskGroupState groupState, PartitionedStream`2 partitions, SynchronousChannel`1[] channels, TaskScheduler taskScheduler)
   at System.Linq.Parallel.DefaultMergeHelper`2.System.Linq.Parallel.IMergeHelper<TInputOutput>.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute()
   at System.Linq.Parallel.MergeExecutor`1.Execute[TKey](PartitionedStream`2 partitions, Boolean ignoreOutput, ParallelMergeOptions options, TaskScheduler taskScheduler, Boolean isOrdered, CancellationState cancellationState, Int32 queryId)
   at System.Linq.Parallel.PartitionedStreamMerger`1.Receive[TKey](PartitionedStream`2 partitionedStream)
   at System.Linq.Parallel.UnaryQueryOperator`2.UnaryQueryOperatorResults.GivePartitionedStream(IPartitionedStreamRecipient`1 recipient)
   at System.Linq.Parallel.QueryOperator`1.ExecuteAndGetResultsAsArray()
   at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery`1 source)
   at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.Execute()
   at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
##[error]Bash exited with code '1'.
Finishing: Restore tools

Further technical details

$ dotnet --version    
8.0.100-rc.2.23502.2

$ dotnet tye --version
0.11.0-alpha.22111.1+3edef5428949c518c078844d6438e5ba86fce600

dotnet-tools.json:

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-coverage": {
      "version": "17.8.6",
      "commands": [
        "dotnet-coverage"
      ]
    },
    "microsoft.tye": {
      "version": "0.11.0-alpha.22111.1",
      "commands": [
        "tye"
      ]
    }
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions