Sunder.Package.Templates 0.8.7

dotnet new install Sunder.Package.Templates@0.8.7
                    
This package contains a .NET Template Package you can call from the shell/command line.

Sunder.Package.Templates

Sunder.Package.Templates provides the dotnet new sunder-package template for creating Sunder runtime package projects.

The template scaffolds a package project that references Sunder.Sdk, Sunder.Package.Build, and Avalonia, declares package metadata, includes a package module, and can optionally include a starter Avalonia view, public contracts project, runtime host dependency, and typed host contracts reference.

Install

Install the template package from NuGet.org:

dotnet new install Sunder.Package.Templates

Install a specific version:

dotnet new install Sunder.Package.Templates::<version>

Create A Package

Create a standard package with a default shell view:

dotnet new sunder-package --name MyPackage --packageId my.company.package --packageName "My Package"

Create package files directly in the specified output folder:

dotnet new sunder-package --name MyPackage --packageId my.company.package --packageName "My Package" --createInPlace --output .\MyPackage

Create a package with no default view:

dotnet new sunder-package --name MyHeadlessPackage --packageId my.company.headless --packageName "My Headless Package" --noDefaultView

Create a package that exposes public contracts:

dotnet new sunder-package --name MyPackage --packageId my.company.package --packageName "My Package" --withContracts

Create an extension package that depends on a host package:

dotnet new sunder-package --name MyExtension --packageId my.company.extension --packageName "My Extension" --withHostDependency --hostPackageId sunder.package.host

Create an extension package that also references a host contracts NuGet package:

dotnet new sunder-package --name MyTypedExtension --packageId my.company.typedextension --packageName "My Typed Extension" --withHostContracts --hostPackageId sunder.package.host --hostContractsPackageId Sunder.Host.Package.Contracts --hostContractsVersion <host-contracts-version>

Template Options

Option Meaning
--packageId <id> Required runtime package id written into generated metadata.
--packageName <name> Required display name written into generated metadata and starter view.
--withContracts Adds a *.Contracts project for public extension points.
--createInPlace Creates package files directly in the specified output folder instead of under a child project folder.
--noDefaultView Omits the default shell-visible package view files.
--withHostDependency Adds runtime dependency metadata for another package.
--hostPackageId <id> Required with --withHostDependency or --withHostContracts; runtime package id that this package depends on.
--withHostContracts Adds host dependency metadata, a NuGet reference to the host package's contracts package, and a compile-safe extension stub.
--hostContractsPackageId <id> Required with --withHostContracts; NuGet package id for host contracts.
--hostContractsVersion <version> Required with --withHostContracts; NuGet package version for host contracts.

Generated Project

A standard generated package includes:

MyPackage/
  MyPackage.csproj
  PackageMetadata.cs
  PackageModule.cs
  Assets/
    icon.png
  PackageViews/
    DefaultPackageView.axaml
    DefaultPackageView.axaml.cs
    DefaultPackageViewModel.cs

Without --createInPlace, the template keeps the project under a child MyPackage/ folder in the selected output. With --createInPlace, the project files above are written directly into the selected output folder.

Generated package projects reference:

  • Sunder.Sdk
  • Sunder.Package.Build
  • Avalonia

Generated projects use NuGet floating versions for Sunder.Sdk and Sunder.Package.Build, so restores resolve the latest stable Sunder SDK/build tooling from the configured package sources.

Package identity and dependencies are emitted from PackageMetadata.cs; Sunder.Package.Build generates sunder-package.json during build.

Build And Run

Build the generated package project:

dotnet build .\MyPackage\MyPackage.csproj

The build emits an unpacked development package under bin/Debug/net10.0/sunder-dev/.

Load the dev package into an installed Sunder App:

& "C:\Path\To\Sunder.App.exe" --dev-package ".\MyPackage\bin\Debug\net10.0\sunder-dev"

Publish

Publish the generated package project to create a .sunderpkg archive:

dotnet publish .\MyPackage\MyPackage.csproj -c Release

Validate before publishing to a registry:

sunder package validate .\MyPackage\bin\Release\net10.0\publish\MyPackage.1.0.0.sunderpkg

More Documentation

  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.7 135 6/4/2026
0.8.6 109 5/29/2026
0.8.5 103 5/29/2026
0.8.4 114 5/23/2026
0.8.3 114 5/19/2026
0.8.2 111 5/15/2026
0.8.1 118 5/12/2026