winapp-identity

작성자: microsoft

데스크톱 앱이 푸시 알림, 백그라운드 작업, 공유 대상, 시작 작업과 같은 Windows API에 액세스할 수 있도록 Windows 패키지 ID를 활성화합니다. 다음 경우에 사용하세요...

npx skills add https://github.com/microsoft/winappcli --skill winapp-identity

When to use

Use this skill when:

  • The exe is separate from your app code — e.g., Electron apps where electron.exe is in node_modules, not your build output
  • Testing sparse package behavior specifically — AllowExternalContent, TrustedLaunch, etc.
  • Registering identity without copying files — create-debug-identity leaves the exe in place

Prefer winapp run for most frameworks. If your exe is inside your build output folder (.NET, C++, Rust, Flutter, Tauri), use winapp run <build-output> instead — it registers a full loose layout package and launches the app, simulating an MSIX install. Use create-debug-identity only when winapp run doesn't fit your scenario.

Prerequisites

  1. Package.appxmanifest in your project — from winapp init or winapp manifest generate
  2. Built executable — the .exe your app runs from

What is package identity?

Windows package identity enables your app to use restricted APIs and OS integration features:

  • Push notifications (WNS)
  • Background tasks
  • Share target / share source
  • App startup tasks
  • Taskbar pinning
  • Windows AI APIs (Phi Silica, OCR, etc.)
  • File type associations registered properly in Settings

A standard .exe (from dotnet build, cmake, etc.) does not have identity. create-debug-identity registers a sparse package with Windows — the exe stays in its original location and Windows associates identity with it via Add-AppxPackage -ExternalLocation. This is different from winapp run, which copies files into a loose layout package.

Usage

Basic usage

# Register sparse package for your exe (manifest auto-detected from current dir)
winapp create-debug-identity ./bin/Release/myapp.exe

# Specify manifest location
winapp create-debug-identity ./bin/Release/myapp.exe --manifest ./Package.appxmanifest

Keep the original package identity

# By default, '.debug' is appended to the package name to avoid conflicts with
# an installed MSIX version. Use --keep-identity to keep the manifest identity as-is.
winapp create-debug-identity ./myapp.exe --keep-identity

Generate without installing

# Create the sparse package layout but don't register it with Windows
winapp create-debug-identity ./myapp.exe --no-install

What the command does

  1. Reads Package.appxmanifest — extracts identity, capabilities, and assets
  2. Creates a sparse package layout in a temp directory
  3. Appends .debug to the package name (unless --keep-identity) to avoid conflicts
  4. Registers with Windows via Add-AppxPackage -ExternalLocation — makes your exe "identity-aware"

After running, launch your exe normally — Windows will recognize it as having package identity.

Recommended workflow

  1. Setup — winapp init . --use-defaults (creates Package.appxmanifest)
  2. Generate development certificate — winapp cert generate
  3. Build your app
  4. Register identity — winapp create-debug-identity ./bin/myapp.exe
  5. Run your app — identity-requiring APIs now work
  6. Re-run step 4 whenever you change Package.appxmanifest or Assets/

Tips

  • You must re-run create-debug-identity after any changes to Package.appxmanifest or image assets
  • The debug identity persists across reboots until explicitly removed
  • To remove: Get-AppxPackage *yourapp.debug* | Remove-AppxPackage
  • If you have both a debug identity and an installed MSIX, they may conflict — use --keep-identity carefully
  • For Electron apps, use npx winapp node add-electron-debug-identity instead (handles Electron-specific paths)

Debugging: winapp run vs create-debug-identity

winapp runcreate-debug-identity
What it registersFull loose layout package (entire folder)Sparse package (single exe)
How the app launchesLaunched by winapp (AUMID activation or execution alias)You launch the exe yourself (command line, IDE, etc.)
Simulates MSIX installYes — closest to production behaviorNo — sparse identity only
Files stay in placeCopied to an AppX layout directoryYes — exe stays at its original path
Debugger-friendlyAttach to PID after launch, or use --no-launch then launch via aliasLaunch directly from your IDE's debugger — the exe has identity regardless
Console app supportLaunched through an execution alias automatically, so stdin/stdout stay in this terminalRun exe directly in terminal
Best forMost frameworks (.NET, C++, Rust, Flutter, Tauri)Electron, or when you need full IDE debugger control (F5 startup debugging)

When to use which

Default to winapp run for most development — it simulates a real MSIX install with full identity, capabilities, and file associations:

winapp run .\build\output          # GUI and console apps alike; a console app
                                   # gets an execution alias automatically

Use create-debug-identity when:

  • Debugging startup code — your IDE launches + debugs the exe directly; identity is attached from the first instruction
  • Exe is separate from build output — e.g., Electron where electron.exe is in node_modules/
  • Testing sparse package behavior — AllowExternalContent, TrustedLaunch
winapp create-debug-identity .\bin\Debug\myapp.exe
# Now launch any way you like — F5, terminal, script — the exe has identity

Common debugging scenarios

ScenarioCommandNotes
Just run with identitywinapp run .\build\DebugSimplest workflow; a console app gets an execution alias automatically
Attach debugger to running appwinapp run .\build\Debug, then attach to PIDMisses startup code
Register identity, launch via AUMIDwinapp run .\build\Debug --no-launchLaunch with start shell:AppsFolder\<AUMID> or the execution alias (not the exe directly)
F5 startup debuggingwinapp create-debug-identity .\bin\myapp.exeIDE controls process from first instruction; best for debugging activation/startup code
Capture debug outputwinapp run .\build\Debug --debug-outputCaptures OutputDebugString; on crash, writes minidump and analyzes managed exceptions automatically. Blocks other debuggers (one debugger per process)
Run and auto-cleanwinapp run .\build\Debug --unregister-on-exitUnregisters the dev package after the app exits
Launch and detach (CI)winapp run .\build\Debug --detachReturns immediately after launch; use --json to get PID for scripting
Clean up stale registrationwinapp unregisterRemoves dev packages for the current project (auto-detects from manifest; pass a .cs for a file-based app)

Using Visual Studio with a packaging project? VS already handles identity, AUMID activation, and debugger attachment from F5. These workflows are most useful for VS Code, terminal-based development, and frameworks VS doesn't natively package (Rust, Flutter, Tauri, Electron, C++).

For full details including IDE setup examples, see the Debugging Guide.

Production sparse packaging (init --sparse / pack / embed-identity)

create-debug-identity is for developer-time debugging (requires Developer Mode, registers a raw manifest). For production — shipping identity to an app distributed by an existing installer (Inno Setup, WiX, NSIS) — use the sparse packaging workflow, which produces a signed identity-only .msix:

# 1. Create the sparse identity manifest for your exe (skips SDK install)
winapp init --exe ./bin/Release/MyApp.exe --sparse --use-defaults

# 2. Build and sign the identity-only .msix (just the manifest, no binaries)
winapp pack ./sparse/appxmanifest.xml --cert ./devcert.pfx

# 3. Embed the <msix> identity element into the exe's fusion manifest
winapp embed-identity ./bin/Release/MyApp.exe

Then your installer registers the package against the install directory: Add-AppxPackage -Path MyApp.identity.msix -ExternalLocation <install-dir>.

Assets are resolved from the external (install) location at runtime, not bundled into the .msix. winapp embed-identity also supports an XML mode (winapp embed-identity ./app.manifest) for updating a checked-in side-by-side manifest. See the Sparse Packaging Guide and the sparse-app sample.

Related skills

  • Need a manifest? See winapp-manifest to generate Package.appxmanifest
  • Need a certificate? See winapp-signing — a trusted cert is required for identity registration
  • Ready for full MSIX distribution? See winapp-package to create an installer
  • Having issues? See winapp-troubleshoot for common error solutions

Troubleshooting

ErrorCauseSolution
"Package.appxmanifest not found"No manifest in current directoryRun winapp init or winapp manifest generate, or pass --manifest
"Failed to add package identity"Previous registration stale or cert untrustedRun winapp unregister to remove stale packages, then winapp cert install ./devcert.pfx (admin)
"Access denied"Cert not trusted or permission issueRun winapp cert install ./devcert.pfx as admin
APIs still fail after registrationApp launched before registration completedClose app, re-run create-debug-identity, then relaunch

CLI reference

Run winapp <command> --help for current command options, or winapp --cli-schema for the complete machine-readable command schema.

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK(agent-framework-azure-ai)를 사용하여 Azure AI Foundry 에이전트를 구축합니다. AzureAIAgentsProvider로 지속적 에이전트를 만들 때, 호스팅 도구(코드 인터프리터, 파일 검색, 웹 검색)를 사용할 때, MCP 서버를 통합할 때, 대화 스레드를 관리할 때, 또는 스트리밍 응답을 구현할 때 사용합니다. 함수 도구, 구조화된 출력, 다중 도구 에이전트를 다룹니다.
development
airunway-aks-setup
microsoft
AKS에서 AI Runway 설정 — 빈 클러스터에서 실행 중인 모델까지. 클러스터 검증, 컨트롤러 설치, GPU 평가, 공급자 설정, 첫 배포를 다룹니다. 시기: "AI Runway 설정", "AKS 클러스터 온보딩", "AI Runway 설치", "airunway 설정", "AKS에 모델 배포", "AKS에서 GPU 추론", "AKS에서 KAITO 설정", "AKS에서 LLM 실행", "AKS에서 vLLM", "AKS에서 모델 서빙 설정", "AI Runway 컨트롤러".
devops
appinsights-instrumentation
microsoft
Azure Application Insights로 웹앱을 계측하기 위한 지침입니다. 원격 분석 패턴, SDK 설정, 구성 참조를 제공합니다. WHEN: 앱 계측 방법, App Insights SDK, 원격 분석 패턴, App Insights란 무엇인가, Application Insights 지침, 계측 예시, APM 모범 사례.
devops
applicationinsights-web-ts
microsoft
브라우저/웹 앱을 Application Insights JavaScript SDK(@microsoft/applicationinsights-web)로 계측합니다. Real User Monitoring(RUM) — 페이지 뷰, 클릭, AJAX/fetch 종속성, 예외, 사용자 지정 이벤트, 백엔드 OpenTelemetry 트레이스와 상관관계가 있는 브라우저 측 GenAI 에이전트 트레이스에 사용합니다. SDK Loader Script 및 npm 설정, 프레임워크 확장(React, React Native, Angular), Click Analytics, 텔레메트리 이니셜라이저, 브라우저에서 생성된 에이전트/도구/모델 스팬에 대한 OTel GenAI 의미론적 규칙을 다룹니다.
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java로 이상 탐지 애플리케이션을 구축하세요. 단변량/다변량 이상 탐지, 시계열 분석 또는 AI 기반 모니터링을 구현할 때 사용하세요.
development
azure-ai-language-conversations-py
microsoft
azure-ai-language-conversations Python SDK를 사용하여 대화형 언어 이해(CLU)를 구현합니다. ConversationAnalysisClient로 대화 의도와 엔터티를 분석하거나, NLP 기능을 구축하거나, 애플리케이션에 언어 이해를 통합할 때 사용합니다.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. ML 작업 영역, 작업, 모델, 데이터 세트, 컴퓨팅 및 파이프라인에 사용합니다. 트리거: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development