News for hackers. Stuff that matters.
Re:dotnet run app.cs by bladeee on Thursday May 29, 2025 @05:16PM (#44130468)
You can use project-scoped tool manifests. Then you can call dotnet tool restore to load all tools specified in the manifest.

https://learn.microsoft.com/en-us/dotnet/core/tools/global-t...

Re:dotnet run app.cs by smarx007 on Thursday May 29, 2025 @05:19PM (#44130492)
TIL, thank you!
Re:dotnet run app.cs by andix on Saturday May 31, 2025 @02:36PM (#44146147)
Sure, but I think you still need to provide the full path of the script. If you're inside a source folder very deep it will lead to something like:

  dotnet script ../../../../../scrips/scaffold-something.cs
With npm run it works from any subdirectory:

  npm run scaffold-something