Reference
Templates
The Kofa.Komod.Template NuGet package contains two dotnet new templates. Installation: Installing the tools.
kofa-komod
One Komod: a server project (ports, settings, main loop, failsafe, Package.props) and optionally a UI project (dashboard tile).
dotnet new kofa-komod -n Acme.Blinker --authorName "Acme Ltd."
| Parameter | Default | Meaning |
|---|---|---|
-n, --name |
– | The project name (Company.Name). The package and Komod id come from it, in lowercase (acme.blinker). |
--ui |
true |
false: no UI project. |
--authorName |
empty | The author in komod.json. |
--sdkVersion |
1.* |
The Kofa.Abstractions NuGet version (floating). |
Created files: Acme.Blinker/ (BlinkerKomod.cs, Package.props, .csproj) and Acme.Blinker.Ui/ (BlinkerWidget.razor).
kofa-komod-quickstart
Two cooperating Komods (thermometer and thermostat) with the dashboard tile: the finished result of the tutorial. It also creates a folder and an .slnx solution.
dotnet new kofa-komod-quickstart -n Acme.Demo --authorName "Acme Ltd."
Its parameters: -n, --authorName, --sdkVersion (as above).
Visual Studio and Rider
After dotnet new install the templates appear in the New project window ("KOFA"). The project is the same as the command-line one: the parameters can be set on the wizard page.
Updating
dotnet new install Kofa.Komod.Template
A newer template is made for a newer SDK. You can move an already created project to a newer SDK by changing the KofaSdkVersion property (Package.props).