dotnet / dotnet/templating

Support `dotnet new library` as an alias to classlib

Open
#9,226 0 comments 2 reactions 0 assignees View on GitHub
triage:transfer-to-sdk
Dominant language
No language data
Stars
1.7k
Forks
399
Avg merge
3d 5h
Merged PRs (30d)
39

Description

### 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.