In the docs it's mentioned that The behavior of the dotnet restore command is affected by some of the settings in the Nuget.Config file. Please consider documenting which settings exactly affect dotnet restore. Because currently I simply have to try what works and what doesn't, which isn't really productive.
For example: NuGet allows using environment variables. But this is not supported through dotnet restore (or at least, I can't seem to get it to work).
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for pointing this out @nphmuller
We'll work to get that updated. /cc @KathleenDollard
@nphmuller hmm, seems like I stumbled to the same error? ;)
@nphmuller @IsmailHassani Hi, I'm going to start taking a look at this.
@nphmuller @IsmailHassani Got an email out. Still searching for info 😄
Sent another email trying to find the information.
Details on what is going on:
dotnet restore is extremely similar to:
dotnet msbuild /t:restore this runs with net core’s msbuild
msbuild /t:restore runs with net framework’s msbuild
Restore Target and Task are implemented in nuget.build.tasks.dll:
https://github.com/NuGet/NuGet.Client/tree/dev/src/NuGet.Core/NuGet.Build.Tasks
Nuget.config details: https://docs.microsoft.com/nuget/consume-packages/configuring-nuget-behavior
Details on some other settings: https://docs.microsoft.com/nuget/consume-packages/managing-the-global-packages-and-cache-folders
The NuGet.config docs have sections that are not applicable:
bindingRedirects
The bindingRedirects section does not apply to PackageReference, in both dotnet.exe and nuget.exe. dotnet.exe supports _only_ PackageReference.
solution
The solution section is legacy and Visual Studio specific.
trustedSigners
The trustedSigners is not applicable because we don’t have support for cross platform verification, so that will be added later. https://github.com/NuGet/Home/issues/7606