Giter Club home page Giter Club logo

Comments (15)

embetten avatar embetten commented on May 27, 2024

The dotnet restore command is typically for restoring .csproj files and supports the interactive flag. dotnet fsi is a completely different command and does not look like it supports the --interactive flag (see docs). So the first part of the cred provider error message to use --interactive for 'dotnet' is not applicable in the f# context. However, it looks like this part of the message: or removing -NonInteractive switch for 'NuGet' [/Users/omcnoe/.packagemanagement/nuget/Projects/--SNIP--/Project.fsproj] might be the correct action for f# projects.

Let me know if this resolves the issue.

from artifacts-credprovider.

omcnoe avatar omcnoe commented on May 27, 2024

--interactive is relevant for dotnet restore in an .fsproj or .csproj project.

That project file named in the error message isn't my project file - a new random project file is created each time you run dotnet fsi. dotnet fsi is failing to be authenticated with the Nuget source, even though I'm already authenticated - I can access the source in other projects with dotnet restore and don't need to re-authenticate.

The authentication plugin is broken under F# interactive mode - at least for me.
I think it's actually a bug.

from artifacts-credprovider.

embetten avatar embetten commented on May 27, 2024

Can you give more details on where you are running dotnet fsi? Visual Studio and version?

I am able to authenticate and install from an Azure Artifacts feed with dotnet fsi and the cred provider (using the #i and#r commands). This worked in both polygot notebooks, the latest version of Visual Studio, and in Visual studio code. I did find authentication did not work with an older version of visual studio and it looks like VS has a couple of open issues tracking this.

from artifacts-credprovider.

omcnoe avatar omcnoe commented on May 27, 2024

I'm on macOS. Using the dotnet sdk installed directly from https://dotnet.microsoft.com/en-us/download

I had sdk 7.0.306, I updated to latest sdk 7.0.401 and it is still not working correctly, still getting same message.

from artifacts-credprovider.

omcnoe avatar omcnoe commented on May 27, 2024

I'm running dotnet fsi directly from command line

from artifacts-credprovider.

embetten avatar embetten commented on May 27, 2024

@omcnoe I was able to repro the issue on a MacOS and spoke with a dev on the f# side. TL;DR this is an issue on the f# side not supporting interactive mode when it calls nuget (msbuild) under the hood. I have created a feature request on their repo.

On my machine running dotnet restore -interactive before dotnet fsi did not require me to reauthenticate and I was able to restore from fsi. From your comments it sounds like this does not work for you? If so, can you ensure you have the most recent version of the cred provider there were some updates to the cache location.

from artifacts-credprovider.

omcnoe avatar omcnoe commented on May 27, 2024

I believe I have the most recent version, but I'm not sure. Is the update process just "run the install again"?

from artifacts-credprovider.

embetten avatar embetten commented on May 27, 2024

Yes, we have an install script for macs to make it easy here. Let me know if this does not resolve the issue.

from artifacts-credprovider.

phil-hodgson avatar phil-hodgson commented on May 27, 2024

@omcnoe Any success with the latest version?

from artifacts-credprovider.

omcnoe avatar omcnoe commented on May 27, 2024

@phil-hodgson no, same exact behavior as before

I think the mention of "interactive mode" in the error message is just a red herring.
I am already authenticated with this nuget source - dotnet restore elsewhere doesn't require me to re-authenticate.

Shouldn't artifacts-credprovider pick up and use this existing auth?
I don't need to re-authenticate using interactive mode inside dotnet fsi - it just has to correctly use whatever existing auth token has already been setup.

from artifacts-credprovider.

johnterickson avatar johnterickson commented on May 27, 2024

I don't use F# but if this uses the same underlying msbuild logic then you should be anle to pass in /p:NuGetInteractive=true.

from artifacts-credprovider.

omcnoe avatar omcnoe commented on May 27, 2024

Hi John, sadly dotnet fsi does not accept that parameter.

Please see the above comment about NuGet "interactive mode" in the error message being a red herring.
I have already authenticated with the nuget source. Other commands like dotnet build that use packages from this source already work fine without requiring me to re-authenticate again.

The problem is that when used by fsi the credential provider is not picking up my existing authentication.

from artifacts-credprovider.

johnterickson avatar johnterickson commented on May 27, 2024

Is this related? dotnet/fsharp#10609

from artifacts-credprovider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.