Skip to content

[WIP] dotnet run: --from-source #48443

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

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from
Draft

Conversation

edvilme
Copy link
Member

@edvilme edvilme commented Apr 14, 2025

Closes #31103

WIP: Name, and implementation may change

image

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Tools untriaged Request triage from a team member labels Apr 14, 2025
@marcpopMSFT
Copy link
Member

Commented offline that we wanted to start with "dotnet tool run --from-source". We're currently discussing alias options or auto-detection options but the full command is safest to start with.

@dsplaisted
Copy link
Member

@edvilme I would recommend patterning this more off of local tools than global tools. Global tools download the packages to a folder structure under .dotnet\tools\.store\, and also download it to a staging folder before copying it to the final location. An executable shim is also created or copied to the global tools folder.

Local tools on the other hand run directly from the packages in the NuGet global packages folder. I think it would be easier to run a tool from there without any side effects besides the fact that the package is now in the global packages folder.

@edvilme edvilme changed the title [WIP] tool runx [WIP] dotnet run: --from-source Apr 15, 2025
@edvilme edvilme marked this pull request as ready for review April 15, 2025 04:57
@edvilme edvilme requested review from dsplaisted and a team April 15, 2025 04:57
Copy link
Member

@nagilson nagilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things to consider for review when it is finished / good test cases:

  • Does it delete the tool, as it says without permanently installing it
  • It passes the args to tools
  • Version resolution works
  • Uses latest if no version specified
  • It uses the feed
  • Make sure we prompt before downloading something new
  • Does it have -y -n
  • Supports nuget feed options

I like dotnet toolx personally but ok to see why we are using --from-source for now since it matches the other patterns.

@edvilme edvilme marked this pull request as draft April 17, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Tools untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a one-shot execution mode for .NET tools a la npx
4 participants