Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotnet core Invalid input switch: -t

I'm trying to figure out how dotnet core is working and therefore creating some projects to play around with it. I found a guide where they said, that i should run "dotnet new -t web" to create a more fully-featured web application. But when i do, it just says:

Invalid input switch:
  -t 

Template Instantiation Commands for .NET Core CLI.

Usage: dotnet new [arguments] [options]

Arguments:
  template  The template to instantiate.

Have they changed it? And why doesn't any documents appear when i run "dotnet new", but only if i do "dotnet new mvc" or "dotnet new web". I'm using Visual Studio Code.

Thanks in advance.

like image 533
Fillah Avatar asked Mar 15 '17 09:03

Fillah


1 Answers

Yes, they changed the CLI tool as part of the move from project.json back to csproj. More info on the official documents.

The best source is the up to date documentation for dotnet new:

Creates a new project, configuration file or solution based on the specified template.

dotnet new <TEMPLATE> [-lang|--language] [-n|--name] [-o|--output] [-all|--show-all] [-h|--help] [Template arguments]
dotnet new <TEMPLATE> [-l|--list]
dotnet new [-all|--show-all]
dotnet new [-h|--help]

Examples:

dotnet new mvc                   ==> New C# MVC app
dotnet new console -lang f#      ==> New F# console app
like image 146
Daniel J.G. Avatar answered Nov 17 '22 10:11

Daniel J.G.