Is your feature request related to a problem? Please describe.
Currently, when adding a NuGet package via the #:package directive in a file-based run, the version must be explicitly specified. For example:
or
These work fine, but if the version is omitted like this:
…it results in an error. This makes the initial user experience more complex, especially for beginners who are unfamiliar with versioning or just want to try out a package quickly.
Describe the solution you'd like
It would be great if omitting the version in the #:package directive would default to the latest stable version available on NuGet. For example:
should internally resolve and use the latest version of the Humanizer package, just as if @* had been specified.
This change would:
- Make scripts easier to write and read.
- Lower the barrier to entry for newcomers.
- Align with common expectations from other package managers and tools.
Additional context
This feature would provide a smoother onboarding experience and allow for quicker experimentation. Explicit versioning can still be used when needed, but shouldn't be required by default for simple scenarios.
Is your feature request related to a problem? Please describe.
Currently, when adding a NuGet package via the
#:packagedirective in a file-based run, the version must be explicitly specified. For example:or
These work fine, but if the version is omitted like this:
…it results in an error. This makes the initial user experience more complex, especially for beginners who are unfamiliar with versioning or just want to try out a package quickly.
Describe the solution you'd like
It would be great if omitting the version in the
#:packagedirective would default to the latest stable version available on NuGet. For example:should internally resolve and use the latest version of the
Humanizerpackage, just as if@*had been specified.This change would:
Additional context
This feature would provide a smoother onboarding experience and allow for quicker experimentation. Explicit versioning can still be used when needed, but shouldn't be required by default for simple scenarios.