Skip to content

Support dotnet new library as an alias to classlib #9226

@T-Gro

Description

@T-Gro

Product

dotnet CLI (dotnet new)

Describe The Bug

I found it natural to create a new library project by saying its a library. As a human, when speaking about project types, we use terms like console/winforms/wpf project, but I would never say out loud "Yeah, that code lives in a classlib project".

When I tried dotnet new library on a fresh box, it yielded an error.
I think library should be supported as an alias to classlib.

To Reproduce

dotnet new library -lang F#

No templates or subcommands found matching: 'library'.

dotnet Info

output PS Q:\> dotnet --info .NET SDK: Version: 10.0.100-preview.6.25358.103 Commit: 75972a5ba7 Workload version: 10.0.100-manifests.cc13e7a2 MSBuild version: 17.15.0-preview-25358-103+75972a5ba

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100-preview.6.25358.103\

Visual Studio Version

No response

Additional context

I tried to follow GH copilot's tips on finding the right repo, this was one of the few that was not a made up name. It is very possible my issue still belongs somewhere else alltogether.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions