Skip to content

Local build on Ubuntu 16.04 fails with restore error #34994

Closed

Description

@janvorli

I am hitting the following error when trying to build runtime locally:

./build.sh -subset Clr -binaryLog
  Determining projects to restore...
  Microsoft.DotNet.ToolPackage.ResolverCacheInconsistentException: more than one row for coverlet.console-1.7.0-net5.0-any-coverlet
     at Microsoft.DotNet.ToolPackage.LocalToolsResolverCache.TryGetMatchingRestoredCommand(RestoredCommandIdentifier restoredCommandIdentifier, CacheRow[] cacheTable, RestoredCommand& restoredCommandList)
     at Microsoft.DotNet.ToolPackage.LocalToolsResolverCache.TryLoad(RestoredCommandIdentifier restoredCommandIdentifier, RestoredCommand& restoredCommand)
     at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.PackageHasBeenRestored(ToolManifestPackage package, String targetFramework)
     at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)
     at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.<>c__DisplayClass11_0.<Execute>b__0(ToolManifestPackage package)
     at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
     at System.Linq.ParallelEnumerable.ToList[TSource](ParallelQuery`1 source)
     at System.Linq.ParallelEnumerable.ToArray[TSource](ParallelQuery`1 source)
     at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.Execute()
     at Microsoft.DotNet.Cli.DotNetTopLevelCommandBase.RunCommand(String[] args)
     at Microsoft.DotNet.Tools.Tool.ToolCommand.Run(String[] args)
     at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
     at Microsoft.DotNet.Cli.Program.Main(String[] args)

This seems to be exactly the same issue as #33837 that was happening in the CI and that was supposed to be fixed.

Activity

  1. added this to the 5.0 milestone on Apr 15, 2020
  2. added
    untriaged
    on Apr 15, 2020
  3. jaredpar commented on Apr 15, 2020

    @jaredpar
    Member

    @janvorli can you try running the following command?

    /home/janvorli/git/runtime2/.dotnet/dotnet nuget list source

    Suspect that you have a source there which is complicating things. This is the output from my machine where I can restore successfully:

    P:\runtime> .\dotnet.cmd nuget list source
    P:\runtime\.dotnet
    Registered Sources:
      1.  nuget.org [Enabled]
          https://api.nuget.org/v3/index.json
      2.  dotnet-tools [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
      3.  dotnet-eng [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
      4.  dotnet5 [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
      5.  dotnet5-transport [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json
    
  4. janvorli commented on Apr 15, 2020

    @janvorli
    MemberAuthor

    This is what the command dumped:

    /home/janvorli/git/runtime2/.dotnet/dotnet nuget list source
    Registered Sources:
      1.  nuget.org [Enabled]
          https://api.nuget.org/v3/index.json
    
  5. jaredpar commented on Apr 16, 2020

    @jaredpar
    Member

    @janvorli did you run that from within the git/runtime2 directory? There should be more sources than that else you wouldn't get very far

    That really shouldn't impact things though. Given your starting state is a cleared NuGet cache and you ran git clean -dxf . the only source that could produce the extra package I can think of is extra feeds. There don't appear to be any on your machine though.

    @ViktorHofer @safern for ideas on where this duplicate package could be coming from.

  6. janvorli commented on Apr 16, 2020

    @janvorli
    MemberAuthor

    No, I didn't. I am sorry I have not realized it makes a difference. Here is the output when ran from that directory:

    Registered Sources:
      1.  nuget.org [Enabled]
          https://api.nuget.org/v3/index.json
      2.  dotnet-tools [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
      3.  dotnet-eng [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json
      4.  dotnet5 [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json
      5.  dotnet5-transport [Enabled]
          https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json
    
    
  7. ViktorHofer commented on Apr 20, 2020

    @ViktorHofer
    Member

    That issue is dotnet/sdk#10938 (comment). I'll open one in Arcade to track setting DOTNET_CLI_HOME.

  8. jaredpar commented on Apr 20, 2020

    @jaredpar
    Member

    That issue in SDK is closed though. Is the change just not merged into dotnet/runtime yet?

  9. ViktorHofer commented on Apr 20, 2020

    @ViktorHofer
    Member

    There was no follow-up change, it was just closed. My guess is because it wasn't actionable in dotnet/sdk. cc @wli3

  10. jashook commented on May 11, 2020

    @jashook
    Contributor

    @ViktorHofer is there any follow up here?

  11. ViktorHofer commented on May 11, 2020

    @ViktorHofer
    Member

    Yes, dotnet/arcade#5402 was opened as a follow-up.

  12. removed
    untriaged
    on May 11, 2020
  13. modified the milestones: 5.0.0, 6.0.0 on Aug 3, 2020
  14. janvorli commented on Jul 13, 2021

    @janvorli
    MemberAuthor

    I believe this was fixed already.

  15. ghost locked as resolved and limited conversation to collaborators on Aug 12, 2021
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

    area-Infrastructure-coreclr

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions