NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 253 forks source link

[Feature]: Add `interactive` option for `dotnet pack` #12005

Open anangaur opened 2 years ago

anangaur commented 2 years ago

NuGet Product(s) Involved

dotnet.exe

The Elevator Pitch

Today, it too simple to create a package using the following commands:

> dotnet new classlib
> dotnet pack

However, this also means that a lot of defaults as assumed like the package name, package version, and misses out on some of the important metadata like:

There is no easy way to be able to create these metadata into the package. The only ways available requires either Visual Studio (Package Properties UI) or a text editor (VS Code) to directly edit the csproj. We need an easy interactive mode for command line developers to include the required metadata in an easy way without having to refer documentation on their syntax.

Proposal

Provide an interactive way for developers top enter the required metadata for a package. Something like:

> dotnet pack -i
name: <default: the current directory name>
version: <default: 1.0.0>
description: <default: Package description>
author: <default: empty-string>
license: <default:ISC>
README: <default: location to the README in the root directory>

Additional Context and Details

This can improve the quality of packages, by default.

anangaur commented 1 year ago

/cc: @baronfel for discussions around pack analyzers or dotnet new templates