Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdk resolver does not honor --configfile; and fails silently #10886

Closed
ghost opened this issue May 21, 2021 · 2 comments
Closed

Sdk resolver does not honor --configfile; and fails silently #10886

ghost opened this issue May 21, 2021 · 2 comments
Labels
Area:Settings NuGet.Config and related issues Product:dotnet.exe Type:Bug

Comments

@ghost
Copy link

ghost commented May 21, 2021

Issue copied from dotnet/sdk#17319 per request of @erdembayar

Details about Problem

When performing dotnet restore using the --configfile argument, the nuget Sdk resolver does not honor the --configfile setting.

This results in two problems:

  1. restore fails to restore the SDKs in question.
  2. the restore exist with a success exit code, when it should not.

This issue is tracking the first problem. (second problem tracked by separate issue, dotnet/msbuild#6281)

NuGet product used (NuGet.exe | Visual Studio | MSBuild.exe | dotnet.exe):

aaronla@aaronla-rabbit:repro_sdk$ dotnet --version
5.0.202

Product version:

Worked before? If so, with which NuGet version:

No

Repro steps and/or sample project

  1. git clone https://github.com/aaronla-ms/bug-repros
  2. cd bug-repros/repro_sdk
  3. dotnet restore --configfile custom_nuget.config
  4. dotnet build --no-restore
[git: main]
aaronla@aaronla-rabbit:repro_sdk$ dotnet restore --configfile custom_nuget.config

[git: main]
aaronla@aaronla-rabbit:repro_sdk$ echo %ERRORLEVEL%
0

[git: main]
aaronla@aaronla-rabbit:repro_sdk$ dotnet build --no-restore
Microsoft (R) Build Engine version 16.9.0+57a23d249 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

c:\repos\aaronla-ms\bug-repros\repro_sdk\my.csproj : error MSB4236: The SDK 'Microsoft.Build.Traversal' specified could not be found.

Build FAILED.

c:\repos\aaronla-ms\bug-repros\repro_sdk\my.csproj : error MSB4236: The SDK 'Microsoft.Build.Traversal' specified could not be found.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.12

Expected: restore succeeds, and build succeeds

Actual: restore reports success, but did not restore anything. Consequently, build fails.

Verbose Logs

@rseanhall
Copy link

This seems to be a duplicate of #7855.

@ghost
Copy link
Author

ghost commented May 24, 2021

Wow. Very old bug. Agreed, dup of [#7855](#7855.

I guess what I'm hearing is to not hold my breath for a fix.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Settings NuGet.Config and related issues Product:dotnet.exe Type:Bug
Projects
None yet
Development

No branches or pull requests

2 participants