fsprojects / fsprojects/Paket

Azure agent with windows2019 configuration fails paket restore

Open
#4,131 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

Paket fails to use credentials management on Azure build node with windows2019 configuration

Repro steps

Azure DevOps agent has been provisioned with windows2019

Using these tasks in the pipeline:

Task         : Paket Credential Manager
Description  : Creates a credential manager for Paket to access internal NuGet feeds.
Version      : 0.2.5
Author       : Matthias Dittrich
Help         : This task allows you to consume NuGet packages hosted in your own private feed by providing a credential manager.
==============================================================================
Task         : Paket Restore
Description  : Restores your Paket dependencies.
Version      : 0.4.5
Author       : Isaac Abraham
Help         : This task restores your dependencies from the paket.dependencies file located in your repository.

Expected behavior

Restoring of packages works normally

Actual behavior

Restore fails with

Standard Error: It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
  - The following frameworks were found:
      3.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      3.1.6 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      3.1.20 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      3.1.22 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      3.1.23 at [C:\hostedtoolcache\windows\dotnet\shared\Microsoft.NETCore.App]
      5.0.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      5.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      5.0.14 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

The specified framework can be found at:
  - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=win10-x64
   at Paket.CredentialProviders.callProvider(String provider, CredentialProviderParameters args)
   at Paket.CredentialProviders.action@1-1(Boolean isRetry, String provider, String source, String key, CredentialProviderParameters args, Unit _arg1)
   at Paket.CredentialProviders.handleProvider(Boolean isRetry, String provider, String source)
   at Paket.CredentialProviders.GetAuthenticationDirect@199.Invoke(String provider)
   at Paket.CredentialProviders.GetAuthenticationProvider@206-1.Invoke(Boolean isRetry)
   at Microsoft.FSharp.Collections.SeqModule.TryPick[T,TResult](FSharpFunc`2 chooser, IEnumerable`1 source)
   at Paket.NetUtils.resolveAuth@487-1.Invoke(Unit unitVar)
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
--- End of stack trace from previous location where exception was thrown ---

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure using the Azure DevOps windows2019 agent with the Paket Credential Manager and Paket Restore tasks. Start from Paket.CredentialProviders.callProvider in the reported stack trace and compare the required Microsoft.NETCore.App 2.0.0 runtime with the installed versions; done means Paket restores the private-feed dependencies successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, fsharp
Domain
build-system, devops, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.