question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't pass a name to filter with dotnet new --list

See original GitHub issue
VERSION: 3.0.100-preview5-011568

Both dotnet new -l and dotnet new --list give errors when passing a name to filter by. The help information states:

  -l, --list          Lists templates containing the specified name. If no name is specified, lists all templates.

But when I run dotnet new -l class I get this error:

Invalid input switch:
  class
Run dotnet new --help for usage information.
See https://aka.ms/dotnet-install-templates to learn how to install additional template packs.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Thrakacommented, Jun 14, 2019

Is it possible to get this issue on the radar for discussion on rewriting the format of this command to be more intuitive? 😄

0reactions
vlada-shubinacommented, Mar 23, 2022

Most items in the issue were fixed in .NET 7.0.1xx preview2.

  • more intuitive syntax for list dotnet new list class
  • usage in help - reflects all elements of command syntax now
Usage:
  dotnet new [<template-short-name> [<template-args>...]] [options]
  dotnet new [command] [options]

Old syntax is still supported

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pass multiple tests names in "dotnet test --filter" option
I can't seem to get the '&' operator syntax right for the "--filter" option. I am able to pass only one test name...
Read more >
dotnet new list - .NET CLI
The dotnet new list command lists available templates to use with dotnet new . If the <TEMPLATE_NAME> is specified, lists templates ...
Read more >
Filters in ASP.NET Core
Learn how filters work and how to use them in ASP.NET Core.
Read more >
Work with data in ASP.NET Core Apps
It's generally safer to pass any filters into the method performing the data access, and return back an in-memory collection (for example, List< ......
Read more >
dotnet publish command - .NET CLI
Name. dotnet publish - Publishes the application and its dependencies to a folder for deployment to a hosting system.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found