Closed 304NotModified closed 1 hour ago
Since we had already --add-source
option, would it help?
Though they do have different semantic meaning
@304NotModified
dotnet tool install
has a --add-source
option that adds an additional NuGet package source to use during installation(referred in this documentation). I wonder if this help with your request? For more information, see What happens when a NuGet package is installed?.
Thanks!
Im afraid it won't solve my issue. There are multiple feeds configured already and some need authentication. But unfortunately that wont work on our CI. Also the build machines are reused after the build so I cant do persistent code changes.
So I need a way to only use the non-authenticated feed. For now we do write a config file with powershell (because its a template and we cant force a configfile from our users)
I have tried doing this
dotnet tool install --tool-path . --add-source 'https://api.nuget.org/v3/index.json' --ignore-failed-sources --version 5.3.6 dotnet-reportgenerator-globaltool
But it still fails since the Nuget.config
has a private feed.. even though ignore-faileds-sources
is set.
Seems to be related to https://github.com/dotnet/sdk/issues/24140 ?
dotnet add package
anddotnet restore
has the--source
option:dotnet tool install
is missing that option. It has the--configfile
option, but that is more work in the CI/CD (sometimes you don't have a file). Note the--configfile
option is also available withdotnet restore
but not withdotnet add package
Please add the
--source
fordotnet tool install