dotnet add package ignores nuget.config <clear /> directive #7864
Labels
Area:Settings
NuGet.Config and related issues
Product:dotnet.exe
RegressionDuringThisVersion
A regression which broke since last RTM, and was fixed before the next RTM.
Type:Bug
Milestone
From @flcdrg on March 11, 2019 0:12
Steps to reproduce
dotnet new console
<clear />
directive but remove other package sources. eg.dotnet add .\dotnetadd-bug.csproj package NewtonSoft.JSON
Expected behavior
Adding package should fail because there are no package sources configured
Actual behavior
Package is added successfully because it appears to use other package sources.
Note that this is a minimal repo - obviously you wouldn't usually just have a 'clear'! The original problem I saw was where a project was configured to just use an Azure Artifacts repository, but because of the apparent ignoring of the clear directive, packages were being resolved via these other sources rather than through the Artifacts repository (which meant that that repository wasn't using its own upstream sources as expected)
eg.
Environment data
Copied from original issue: dotnet/cli#10960
The text was updated successfully, but these errors were encountered: