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

Add --source for dotnet tool install - for specifying the package source url #37716

Closed
304NotModified opened this issue Dec 27, 2023 · 4 comments
Assignees
Milestone

Comments

@304NotModified
Copy link

dotnet add package and dotnet restore has the --source option:

The URI of the NuGet package source to use during the restore operation.

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 with dotnet restore but not with dotnet add package

Please add the --source for dotnet tool install

@marcpopMSFT marcpopMSFT transferred this issue from dotnet/installer Jan 2, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Tools untriaged Request triage from a team member labels Jan 2, 2024
@WeihanLi
Copy link
Contributor

WeihanLi commented Jan 5, 2024

Since we had already --add-source option, would it help?
Though they do have different semantic meaning

@JL03-Yue
Copy link
Member

JL03-Yue commented Jan 8, 2024

@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?.

@304NotModified
Copy link
Author

304NotModified commented Jan 9, 2024

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)

@JL03-Yue JL03-Yue removed the untriaged Request triage from a team member label Jan 10, 2024
@nagilson nagilson added the needs team triage Requires a full team discussion label Mar 19, 2024
@nagilson nagilson removed their assignment Mar 19, 2024
@marcpopMSFT marcpopMSFT added this to the 9.0.1xx milestone Mar 19, 2024
@marcpopMSFT marcpopMSFT removed the needs team triage Requires a full team discussion label Mar 19, 2024
@JL03-Yue JL03-Yue removed their assignment Apr 19, 2024
@hayer
Copy link

hayer commented Jun 11, 2024

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 #24140 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants