Skip to content

Commit e8d9a52

Browse files
chiaramooneyazchohfiCopilotnmetulevCopilot
authored
Merge VS Code Extension into main (#420)
## Description <!-- Briefly describe what this PR does and why --> Merge VS Code extension into main. Includes Winapp commands, launch and debug, and README. Does not include extension in publish. Adds WinUI templates. ## Usage Example <!-- If this PR adds or changes commands, flags, or APIs, include a short code snippet --> <!-- Example: ```bash winapp store app list ``` --> Install extension in VS Code and use commands/launch windows apps. ## Related Issue <!-- Link to any related issues: Fixes #123, Closes #456, Related to #789 --> ## Type of Change <!-- Keep the applicable line(s), delete the rest --> - ✨ New feature ## Checklist <!-- Delete the ones that do not apply to your changes --> - [ ] New tests added for new functionality (if applicable) - [x] Tested locally on Windows - [ ] Main [README.md](../README.md) updated (if applicable) - [ ] [docs/usage.md](../docs/usage.md) updated (if CLI commands changed) ## Screenshots / Demo <!-- If applicable, add screenshots or GIFs demonstrating the changes --> ## Additional Notes <!-- Any additional information that reviewers should know --> ## AI Description <!-- ai-description-start --> This pull request merges the VS Code extension into the main codebase, introducing Winapp commands, launch, and debug features. Additionally, it adds WinUI templates and includes updated documentation reflecting these changes. Users can now install the extension and utilize commands for launching Windows apps directly from VS Code. ```bash # Add alias inferred from the Executable attribute in the manifest winapp manifest add-alias # Specify the alias name explicitly winapp manifest add-alias --name myapp # Target a specific manifest file winapp manifest add-alias --manifest ./path/to/appxmanifest.xml ``` <!-- ai-description-end --> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Alexandre Zollinger Chohfi <alzollin@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nikola Metulev <nmetulev@users.noreply.github.com> Co-authored-by: Nikola Metulev <711864+nmetulev@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Zach Teutsch <88554871+zateutsch@users.noreply.github.com>
1 parent a0fa1b1 commit e8d9a52

File tree

34 files changed

+5251
-11
lines changed

34 files changed

+5251
-11
lines changed

.github/plugin/agents/winapp.agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Want to inspect or interact with a running app's UI?
226226

227227
### .NET (WPF, WinForms, Console)
228228
- **Setup:** `winapp init --use-defaults` — but if you already have a `Package.appxmanifest` (e.g., WinUI 3 apps), you likely **don't need `winapp init`**. Just ensure your `.csproj` references the `Microsoft.WindowsAppSDK` NuGet package and has the right properties for packaged builds.
229-
- **Run with identity:** Build with `dotnet build <project.csproj> -c Debug -p:Platform=x64`, then `winapp run bin\x64\Debug\<tfm>\win-x64\`. Replace `<tfm>` with your target framework (e.g., `net10.0-windows10.0.26100.0`) and adjust architecture as needed.
229+
- **Run with identity:** `winapp init` auto-adds the `Microsoft.Windows.SDK.BuildTools.WinApp` NuGet package, so just `dotnet run` registers a loose layout package and launches with identity. Without the NuGet package, build with `dotnet build <project.csproj> -c Debug -p:Platform=x64`, then `winapp run bin\x64\Debug\<tfm>\win-x64\`. Replace `<tfm>` with your target framework (e.g., `net10.0-windows10.0.26100.0`) and adjust architecture as needed.
230230
- **Package:** `dotnet build -c Release -p:Platform=x64`, then `winapp package bin\x64\Release\<tfm>\win-x64\ --cert devcert.pfx`
231231
- No native addons needed — .NET has direct Windows API access via `Microsoft.Windows.SDK.NET.Ref`
232232
- Guide: https://github.com/microsoft/WinAppCli/blob/main/docs/guides/dotnet.md

.github/plugin/skills/winapp-cli/frameworks/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Additional Electron guides:
5050
- Projects with NuGet references to `Microsoft.Windows.SDK.BuildTools` or `Microsoft.WindowsAppSDK` **don't need `winapp.yaml`** — winapp auto-detects SDK versions from the `.csproj`
5151
- The key prerequisite is `appxmanifest.xml`, not `winapp.yaml`
5252
- No native addon step needed — unlike Electron, .NET can call Windows APIs directly
53+
- `winapp init` automatically adds the `Microsoft.Windows.SDK.BuildTools.WinApp` NuGet package, enabling `dotnet run` with automatic identity registration
5354

5455
**If you already have a `Package.appxmanifest`** (e.g., WinUI 3 apps or projects with an existing packaging setup), you likely **don't need `winapp init`** — your project is already configured for packaged builds. Just make sure:
5556
- Your `.csproj` references the `Microsoft.WindowsAppSDK` NuGet package (WinUI 3 apps already have this)

.github/plugin/skills/winapp-cli/manifest/SKILL.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,23 @@ This adds a `uap5:AppExecutionAlias` extension to the manifest. If the alias alr
102102

103103
> **When combined with `winapp run --with-alias`** or the `WinAppRunUseExecutionAlias` MSBuild property, this enables apps to run in the current terminal with inherited stdin/stdout/stderr instead of opening a new window.
104104
105+
### Add an execution alias
106+
107+
Execution aliases let users launch the app by typing its name in a terminal (e.g. `myapp`).
108+
109+
```powershell
110+
# Add alias inferred from the Executable attribute in the manifest
111+
winapp manifest add-alias
112+
113+
# Specify the alias name explicitly
114+
winapp manifest add-alias --name myapp
115+
116+
# Target a specific manifest file
117+
winapp manifest add-alias --manifest ./path/to/appxmanifest.xml
118+
```
119+
120+
This adds a `uap5:AppExecutionAlias` extension to the manifest. If the alias already exists, the command reports it and exits successfully.
121+
105122
## Manifest structure overview
106123

107124
A typical `appxmanifest.xml` looks like:

.github/plugin/skills/winapp-cli/setup/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ winapp run ./bin/Debug --debug-output
102102

103103
Use `winapp run` during iterative development — it creates a loose layout package, registers a debug identity, and launches the app in one step. For identity-only registration without loose layout, use `winapp create-debug-identity` instead.
104104

105+
105106
#### Choosing between `run` and `create-debug-identity`
106107

107108
| | `winapp run` | `create-debug-identity` |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ obj/
155155
*.sln.docstates
156156
# VS Code
157157
.vscode/
158+
# Allow .vscode config for the VS Code extension project
159+
!src/winapp-VSC/.vscode/
158160
# Visual Studio
159161
.vs/
160162
# NuGet packages

.vscode/settings.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,13 @@
7777
"xtr1common": "cpp",
7878
"xtree": "cpp",
7979
"xutility": "cpp"
80-
}
80+
},
81+
"files.exclude": {
82+
"src/winapp-VSC/out": false // set this to true to hide the "out" folder with the compiled JS files
83+
},
84+
"search.exclude": {
85+
"src/winapp-VSC/out": true // set this to false to include "out" folder in search results
86+
},
87+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
88+
"typescript.tsc.autoDetect": "off"
8189
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
273273

274274
To build the CLI:
275275
```
276-
# Build the CLI and package for npm, and NuGet, from the repo root
276+
# Build the CLI and package for npm, VS Code extension, NuGet, and MSIX from the repo root
277277
.\scripts\build-cli.ps1
278278
```
279279

docs/dotnet-run-support.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ The main build script now includes NuGet packaging:
114114
```powershell
115115
.\scripts\build-cli.ps1 # Full build including NuGet
116116
.\scripts\build-cli.ps1 -SkipNuGet # Skip NuGet packages
117+
.\scripts\build-cli.ps1 -SkipVsc # Skip VS Code extension
117118
```
118119

119120
## Usage
@@ -155,14 +156,15 @@ Register identity without launching:
155156
</PropertyGroup>
156157
```
157158

159+
158160
Capture OutputDebugString messages and first-chance exceptions:
159161
```xml
160162
<PropertyGroup>
161163
<WinAppRunDebugOutput>true</WinAppRunDebugOutput>
162164
</PropertyGroup>
163165
```
164166

165-
## Outstanding Production Blockers
167+
## Production Blockers
166168

167169
### 1. CLI AOT Build Issues (BLOCKING)
168170

docs/fragments/skills/winapp-cli/frameworks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Additional Electron guides:
4545
- Projects with NuGet references to `Microsoft.Windows.SDK.BuildTools` or `Microsoft.WindowsAppSDK` **don't need `winapp.yaml`** — winapp auto-detects SDK versions from the `.csproj`
4646
- The key prerequisite is `appxmanifest.xml`, not `winapp.yaml`
4747
- No native addon step needed — unlike Electron, .NET can call Windows APIs directly
48+
- `winapp init` automatically adds the `Microsoft.Windows.SDK.BuildTools.WinApp` NuGet package, enabling `dotnet run` with automatic identity registration
4849

4950
**If you already have a `Package.appxmanifest`** (e.g., WinUI 3 apps or projects with an existing packaging setup), you likely **don't need `winapp init`** — your project is already configured for packaged builds. Just make sure:
5051
- Your `.csproj` references the `Microsoft.WindowsAppSDK` NuGet package (WinUI 3 apps already have this)

docs/fragments/skills/winapp-cli/manifest.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,23 @@ This adds a `uap5:AppExecutionAlias` extension to the manifest. If the alias alr
9797

9898
> **When combined with `winapp run --with-alias`** or the `WinAppRunUseExecutionAlias` MSBuild property, this enables apps to run in the current terminal with inherited stdin/stdout/stderr instead of opening a new window.
9999
100+
### Add an execution alias
101+
102+
Execution aliases let users launch the app by typing its name in a terminal (e.g. `myapp`).
103+
104+
```powershell
105+
# Add alias inferred from the Executable attribute in the manifest
106+
winapp manifest add-alias
107+
108+
# Specify the alias name explicitly
109+
winapp manifest add-alias --name myapp
110+
111+
# Target a specific manifest file
112+
winapp manifest add-alias --manifest ./path/to/appxmanifest.xml
113+
```
114+
115+
This adds a `uap5:AppExecutionAlias` extension to the manifest. If the alias already exists, the command reports it and exits successfully.
116+
100117
## Manifest structure overview
101118

102119
A typical `appxmanifest.xml` looks like:

0 commit comments

Comments
 (0)