AgentSkillsCN

publishing-wpf-apps

指导 WPF 应用程序的发布流程及安装程序选项。当用户提及“发布”“部署”“上线”“打包”或“安装程序”时,帮助用户选择合适的部署方式与安装技术。

SKILL.md
--- frontmatter
name: publishing-wpf-apps
description: "Guides WPF application publishing and installer options. Use when user mentions publish, deploy, release, packaging, or installer to help choose deployment method and installer technology."

WPF Application Publishing Guide

When publishing WPF applications, ask the user about deployment and installer preferences.


Ask User: Deployment Method

Which deployment method do you need?

  1. Framework-Dependent - Small size (~1MB), requires .NET runtime
  2. Self-Contained - Includes runtime (150-200MB), no dependencies
  3. Single-File - One executable (50-80MB compressed)

Ask User: Installer Technology

Which installer/update technology do you prefer?

  1. Velopack (Recommended) - Modern, fast updates, delta updates
  2. MSIX - Windows Store, enterprise deployment
  3. NSIS - Traditional installer, full control
  4. Inno Setup - Simple, widely used
  5. None - Portable/xcopy deployment

Quick Reference

Deployment Methods

MethodSizeStartupRequirements
Framework-Dependent~1MBFast.NET runtime
Self-Contained150-200MBFastNone
Single-File150-200MBMediumNone
Single-File + Compressed50-80MBSlowerNone

Installer Technologies

TechnologyAuto-UpdateDelta UpdatesStoreComplexity
VelopackLow
MSIXMedium
NSISManualHigh
Inno SetupManualMedium

WPF Limitations

⚠️ PublishTrimmed: Not supported (reflection-heavy) ⚠️ PublishAot: Not supported (WPF incompatible)


Basic Commands

bash
# Framework-Dependent
dotnet publish -c Release

# Self-Contained
dotnet publish -c Release -r win-x64 --self-contained true

# Single-File (WPF)
dotnet publish -c Release -r win-x64 --self-contained true \
  -p:PublishSingleFile=true \
  -p:IncludeNativeLibrariesForSelfExtract=true

Additional Resources