我试图弄清楚 dotnet core 是如何工作的,因此创建了一些项目来使用它。我找到了一个指南,他们说我应该运行“dotnet new -t web”来创建一个功能更齐全的 Web 应用程序。但当我这样做时,它只是说:
Invalid input switch:
-t
Template Instantiation Commands for .NET Core CLI.
Usage: dotnet new [arguments] [options]
Arguments:
template The template to instantiate.
他们改变了吗?为什么当我运行“dotnet new”时没有出现任何文档,但只有当我执行“dotnet new mvc”或“dotnet new web”时才出现。我正在使用 Visual Studio Code。
提前致谢。
最佳答案
是的,作为从 project.json
迁移回 csproj
的一部分,他们更改了 CLI 工具。更多信息请关注官方documents .
最好的来源是 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
关于asp.net-core - Dotnet核心输入开关无效: -t,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42806355/