dotnet new コマンドのサードパーティ製カスタムテンプレートを調べてみた(dotnet new -i "Eto.Forms.Templates::*")
Eto.Forms用テンプレートもあった。
参考
Eto.Forms用テンプレートもあった。以下コマンドでインストールできる。
dotnet new -i "Eto.Forms.Templates::*"
手順
テンプレートのインストール
dotnet new -i "Eto.Forms.Templates::*"
... Templates Short Name Language Tags ---------------------------------------------------------------------------------------------------------------------------- Console Application console [C#], F#, VB Common/Console Class library classlib [C#], F#, VB Common/Library Eto Application etoapp [C#], F# Cross Platform/Eto Eto Panel, Dialog or Form etofile [C#], F# Cross Platform/Eto ...
ヘルプ
dotnet new etoapp -h
$ dotnet new etoapp -h Usage: new [options] Options: -h, --help Displays help for this command. -l, --list Lists templates containing the specified name. If no name is specified, lists all templates. -n, --name The name for the output being created. If no name is specified, the name of the current directory is used. -o, --output Location to place the generated output. -i, --install Installs a source or a template pack. -u, --uninstall Uninstalls a source or a template pack. --nuget-source Specifies a NuGet source to use during install. --type Filters templates based on available types. Predefined values are "project", "item" or "other". --dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation. --force Forces content to be generated even if it would change existing files. -lang, --language Filters templates based on language and specifies the language of the template to create. Eto Application (C#) Author: Curtis Wensley Options: -m|--mode How your UI is defined code - Code only UI preview - Partial class with preview xaml - Xaml definition with code behind json - Json definition with code behind Default: code -g|--gtk-version The Gtk# version to target Gtk - Gtk# 3.14+ platform (requires dotnet 2.0 sdk) Gtk2 - Gtk# 2.12 Gtk3 - GTK# 3.0 Default: Gtk -s|--separate Use separate projects for each platform. Default is to create a single destkop project that builds for all platforms bool - Optional Default: false / (*) true -sln|--include-solution Include a .sln file bool - Optional Default: false / (*) true -xm|--include-xammac Include a Xamarin.Mac project to embed mono when compiling on macOS bool - Optional Default: false / (*) true -wf|--include-winforms Include Windows Forms as a target. bool - Optional Default: false / (*) true * Indicates the value used if the switch is provided without a value.
dotnet new etofile -h
$ dotnet new etofile -h Usage: new [options] Options: -h, --help Displays help for this command. -l, --list Lists templates containing the specified name. If no name is specified, lists all templates. -n, --name The name for the output being created. If no name is specified, the name of the current directory is used. -o, --output Location to place the generated output. -i, --install Installs a source or a template pack. -u, --uninstall Uninstalls a source or a template pack. --nuget-source Specifies a NuGet source to use during install. --type Filters templates based on available types. Predefined values are "project", "item" or "other". --dry-run Displays a summary of what would happen if the given command line were run if it would result in a template creation. --force Forces content to be generated even if it would change existing files. -lang, --language Filters templates based on language and specifies the language of the template to create. Eto Panel, Dialog or Form (C#) Author: Curtis Wensley Options: -m|--mode How your UI is defined code - Code only UI preview - Partial class with preview xaml - Xaml definition with code behind json - Json definition with code behind Default: code -b|--base Base class of the UI Panel - A panel to put onto an existing window or control Dialog - A modal dialog that waits for input Form - A modeless form Default: Panel -na|--namespace Namespace for the generated files string - Optional Default: EtoApp
テンプレートで作成してみる
dotnet new etoapp
MonoDevelopのテンプレートと同じ内容が出力された。dllは無かったのでビルドコマンドを叩いた時にネットからダウンロードするのかもしれない。
dotnet new etofile