AvaloniaStack/README.md

33 lines
1.1 KiB
Markdown

# Avalonia Stack
This repository can be used as a `dotnet new` project template. The template
replaces the `Avalonia` prefix in solution files, project files, folder names,
project references, C# namespaces, packaging scripts, and frontend names when a
new project is created.
Use a C# namespace friendly project name such as `DemoApp` or `QiChengApp`.
Avoid names with `-`, spaces, or a leading digit because the generated name is
also used inside C# namespaces.
## Generate from a local clone
```powershell
dotnet new install .
dotnet new Qiang-avalonia-stack -n DemoApp -o ..\DemoApp
```
The generated solution entry point is `DemoApp-Stack.slnx`. Project folders,
project files, and generated C# namespaces keep the project name casing from
`-n`.
## Build an installable template package
```powershell
dotnet pack .\Avalonia.Stack.TemplatePack.csproj -c Release
dotnet new install .\bin\Release\QiCheng.Avalonia.Stack.Templates.1.0.0.nupkg
dotnet new Qiang-avalonia-stack -n DemoApp -o .\DemoApp
```
Publish the generated `.nupkg` to a private or public NuGet feed when you want
to create named projects without cloning this template repository first.