question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

interactive restore failing in latest net7 sdks

See original GitHub issue

Describe the bug

dotnet restore --interactive fails to run the interactive tasks required to authenticate internal feeds msbuild /t:restore /p:nugetInteractive=true does seem to work as a workaround

To Reproduce

Add an internal feed to your nuget.config and try to get it to authenticate using dotnet restore --interactive

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
marcpopMSFTcommented, Sep 8, 2022

I was reproducing it with the following steps

  1. Installing the 6.0.401 candidate build from the artifacts tab
  2. Running installcredprovider per these instructions
  3. Adding the private feed to a nuget config file (dotnet new nugetconfig, dotnet nuget add source https://pkgs.dev.azure.com/dnceng/internal/_packaging/6.0.401-servicing.22421.13-shipping/nuget/v3/index.json)
  4. Then dotnet new console
  5. Then dotnet build -r win-x64 --interactive

Step 5 without the nuget config file should give an error NU1102 not able to find 6.0.9 versions of various runtime packages. Step 5 will give error NU1301 if --interactive is not working along with C:\Program Files\dotnet\sdk\7.0.100-rc.1.22431.12\NuGet.targets(132,5): warning : The plugin credential provider could not acquire credentials. Authentication may require manual action. Consider re-running the command with --interactive for dotnet, /p:NuGetInteractive="true" for MSBuild or removing the -NonInteractive switch forNuGet [C:\Users\WDAGUtilityAccount\test\bug.csproj]

Success will give you the following and an ask to log in the web browser. [NuGet Manager] [CredentialProvider]DeviceFlow: https://pkgs.dev.azure.com/dnceng/internal/_packaging/6.0.401-servicing.22421.13-shipping/nuget/v3/index.json [NuGet Manager] [CredentialProvider]ATTENTION: User interaction required.

1reaction
marcpopMSFTcommented, Sep 7, 2022

@rokonec @AR-May @MichalPavlik this appears to be caused by msbuild server. I had it succeed once for me after trying a bunch of times and on a hunch, I disabled msbuild server (using DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER) and it started working. Once I turned msbuild server back on, it worked the first time but every time after that failed.

Note that --interactive just passes -property:NuGetInteractive=true through to msbuild. Is one of you available to take a look? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
How to fix "No .NET SDKs were found." error--VSCode
Ok This fixed the problem for me. I went to the C:\Program Files (x86)\dotnet. and deleted everthing in the folder.
Read more >
Msbuild not found. This is due to your VCTargetsPath path ...
Build failed with message Error: MSBuild tools not found. ... 1) For new sdk format projects, this node is imported in project folder\obj\xxx....
Read more >
DotNetCoreCLI@2 restore broken for custom MsBuild SDKs
In Azure DevOps, DotNetCoreCLI@2 restore cannot restore my custom SDK in my company's NuGet stream. This issue does not occur for nuget ...
Read more >
Dotnet clean build command. Have a . The tool supports ...
What you're currently telling dotnet to do by calling dotnet build -c Test and dotnet run is: clean, restore, build (using the "Test"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found